Browse Source

improves the test for BelongsToMany Associations to verify if the correct entity was found

Frederik Bauer 10 years ago
parent
commit
ffbea23d9e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tests/TestCase/ORM/Association/BelongsToManyTest.php

+ 2 - 0
tests/TestCase/ORM/Association/BelongsToManyTest.php

@@ -1022,6 +1022,7 @@ class BelongsToManyTest extends TestCase
         $query = $table->Tags->find();
         $result = $query->toArray();
         $this->assertCount(1, $result);
+        $this->assertEquals(1, $result[0]->id);
     }
 
     /**
@@ -1045,6 +1046,7 @@ class BelongsToManyTest extends TestCase
         $query = $table->Tags->find();
         $result = $query->toArray();
         $this->assertCount(1, $result);
+        $this->assertEquals(1, $result[0]->id);
     }
 
     /**