|
|
@@ -57,10 +57,12 @@ class ModelAwareTraitTest extends TestCase {
|
|
|
$stub->setProps('Articles');
|
|
|
$stub->modelFactory('Table', ['\Cake\ORM\TableRegistry', 'get']);
|
|
|
|
|
|
- $this->assertTrue($stub->loadModel());
|
|
|
+ $result = $stub->loadModel();
|
|
|
+ $this->assertInstanceOf('Cake\ORM\Table', $result);
|
|
|
$this->assertInstanceOf('Cake\ORM\Table', $stub->Articles);
|
|
|
|
|
|
- $this->assertTrue($stub->loadModel('Comments'));
|
|
|
+ $result = $stub->loadModel('Comments');
|
|
|
+ $this->assertInstanceOf('Cake\ORM\Table', $result);
|
|
|
$this->assertInstanceOf('Cake\ORM\Table', $stub->Comments);
|
|
|
}
|
|
|
|
|
|
@@ -80,7 +82,7 @@ class ModelAwareTraitTest extends TestCase {
|
|
|
});
|
|
|
|
|
|
$result = $stub->loadModel('Magic', 'Test');
|
|
|
- $this->assertTrue($result);
|
|
|
+ $this->assertInstanceOf('\StdClass', $result);
|
|
|
$this->assertInstanceOf('\StdClass', $stub->Magic);
|
|
|
$this->assertEquals('Magic', $stub->Magic->name);
|
|
|
}
|