Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test: Update both directions in many-to-many relationship #642

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -220,6 +220,9 @@ public function testManyToManyAdd()
$this->assertEquals(1, $list->countBooks(), 'addCrossFk() sets the internal collection properly');
$this->assertEquals(1, $list->countBookListRels(), 'addCrossFk() sets the internal cross reference collection properly');

$this->assertEquals(1, $book->countBookClubLists(), 'addCrossFk() sets the internal collection for related object properly');
$this->assertEquals(1, $book->countBookListRels(), 'addCrossFk() sets the internal cross reference collection for related object properly');

$list->save();
$this->assertFalse($book->isNew(), 'related object is saved if added');
$rels = $list->getBookListRels();
Expand Down