@ -278,7 +290,8 @@ class SaveRelationsBehaviorTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(3, count($project->links), 'Project should have 3 links after assignment');
$this->assertEquals(3, count($project->links), 'Project should have 3 links after assignment');
$this->assertTrue($project->save(), 'Project could not be saved');
$this->assertTrue($project->save(), 'Project could not be saved');
$this->assertEquals(3, count($project->links), 'Project should have 3 links after save');
$this->assertEquals(3, count($project->links), 'Project should have 3 links after save');
$this->assertEquals("https://www.microsoft.com/fr-fr/windows/features", $project->links[2]->link, 'Second link should be https://www.microsoft.com/fr-fr/windows/features');
'Second link should be https://www.microsoft.com/fr-fr/windows/features');
}
}
public function testSaveNewHasManyRelationWithCompositeFksAsArrayShouldSucceed()
public function testSaveNewHasManyRelationWithCompositeFksAsArrayShouldSucceed()
@ -293,8 +306,10 @@ class SaveRelationsBehaviorTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(4, count($project->links), 'Project should have 4 links after assignment');
$this->assertEquals(4, count($project->links), 'Project should have 4 links after assignment');
$this->assertTrue($project->save(), 'Project could not be saved');
$this->assertTrue($project->save(), 'Project could not be saved');
$this->assertEquals(4, count($project->links), 'Project should have 4 links after save');
$this->assertEquals(4, count($project->links), 'Project should have 4 links after save');
$this->assertEquals("https://www.microsoft.com/fr-fr/windows/features", $project->links[2]->link, 'Second link should be https://www.microsoft.com/fr-fr/windows/features');
$this->assertEquals("https://www.microsoft.com/en-us/windows/features", $project->links[3]->link, 'Third link should be https://www.microsoft.com/en-us/windows/features');
'Second link should be https://www.microsoft.com/fr-fr/windows/features');