Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Apr 17, 2016
1 parent b77bd66 commit 8ca4ea8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions src/LazyRecord/BaseCollection.php
Expand Up @@ -303,15 +303,6 @@ public function fetch()
$this->_lastSql = $sql = $this->getCurrentReadQuery()->toSql($driver, $arguments);
$this->_vars = $vars = $arguments->toArray();
$this->handle = $conn->prepareAndExecute($sql, $vars);
/*
} catch (Exception $e) {
return Result::failure('Collection fetch failed: ' . $e->getMessage() , array(
'vars' => $vars,
'sql' => $sql,
'exception' => $e,
));
}
*/
return Result::success('Updated', array( 'sql' => $sql ));
}

Expand Down
4 changes: 2 additions & 2 deletions tests/AuthorBooks/Tests/AuthorCollectionTest.php
Expand Up @@ -241,10 +241,10 @@ public function testCollection()
public function testJoin()
{
$authors = new AuthorCollection;
$authors->join(new \AuthorBooks\Model\Address);
$authors->join(new \AuthorBooks\Model\Address, 'LEFT', 'a');
$authors->fetch();
$sql = $authors->toSQL();
like( '/addresses.address\s+AS\s+addresses_address/', $sql );
like('/LEFT JOIN addresses AS a ON \(m.id = a.author_id\)/', $sql);
}

public function testJoinWithAliasAndRelationId() {
Expand Down

0 comments on commit 8ca4ea8

Please sign in to comment.