Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
(cherry picked from commit 023d349)
  • Loading branch information
sjinks committed Aug 1, 2013
1 parent ef56f77 commit f2eb8d5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
42 changes: 24 additions & 18 deletions unit-tests/DbDescribeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,15 +521,18 @@ public function testDbMysql()
0 => 'albums',
1 => 'artists',
2 => 'customers',
3 => 'parts',
4 => 'personas',
5 => 'personnes',
6 => 'prueba',
7 => 'robots',
8 => 'robots_parts',
9 => 'songs',
10 => 'subscriptores',
11 => 'tipo_documento',
3 => 'm2m_parts',
4 => 'm2m_robots',
5 => 'm2m_robots_parts',
6 => 'parts',
7 => 'personas',
8 => 'personnes',
9 => 'prueba',
10 => 'robots',
11 => 'robots_parts',
12 => 'songs',
13 => 'subscriptores',
14 => 'tipo_documento',
);

$tables = $connection->listTables();
Expand Down Expand Up @@ -718,15 +721,18 @@ public function testDbSqlite()
//List tables
$expectedTables = array (
0 => 'customers',
1 => 'parts',
2 => 'personas',
3 => 'personnes',
4 => 'prueba',
5 => 'robots',
6 => 'robots_parts',
7 => 'sqlite_sequence',
8 => 'subscriptores',
9 => 'tipo_documento',
1 => 'm2m_parts',
2 => 'm2m_robots',
3 => 'm2m_robots_parts',
4 => 'parts',
5 => 'personas',
6 => 'personnes',
7 => 'prueba',
8 => 'robots',
9 => 'robots_parts',
10 => 'sqlite_sequence',
11 => 'subscriptores',
12 => 'tipo_documento',
);

$tables = $connection->listTables();
Expand Down
4 changes: 2 additions & 2 deletions unit-tests/ModelsRelationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ protected function _testIssue938($di)
$this->assertTrue($robot->save());

$parts = M2MParts::find(array('order' => 'id'));
$this->assertTrue(count($parts), 4);
$this->assertEquals(count($parts), 4);

$rp = M2MRobotsParts::find(array('order' => 'robots_id, parts_id'));
$this->assertTrue(count($rp), 4);
$this->assertEquals(count($rp), 4);

for ($i=0; $i<count($rp); ++$i) {
$this->assertEquals($parts[$i]->name, 'Part '. ($i+1));
Expand Down

0 comments on commit f2eb8d5

Please sign in to comment.