I'm writing Unit tests for some of my code, and I'm running into some problems..
I'll make a basic scenario --
class Alpha extends page{
static $belongs_many_many = array('Betas' => 'Beta');
}
class Beta extends page{
static $many_many = array('Alphas' => 'Alpha');
}
Now in my yml file I have :
Alpha:
a1:
Title: Alpha 1
Beta:
b1:
Title: Beta 1
Alphas: =>Alpha.a1
When I try an run one of my tests I get:
'Undefined index: Alpha'
PHPUnit_Util_ErrorHandler::handleError( 8, Undefined index: Alpha, ...path..., 246, Array)
YamlFixture->parseFixtureVal(=>Alpha.a1)
...
There really aren't many examples of dealing with many_many relations in SS's PHPUnit testing, so I'm clearly doing something wrong, but none of my tests have got me a working result :/