Skip to content

Commit

Permalink
Add more coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 18, 2017
1 parent 47cf294 commit 73e07a1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/TestCase/ORM/EagerLoaderTest.php
Expand Up @@ -559,6 +559,35 @@ public function testClearContain()
$this->assertArrayHasKey('clients', $loader->getMatching());
}

/**
* Test for autoFields()
*
* @group deprecated
* @return void
*/
public function testAutoFields()
{
$this->deprecated(function () {
$loader = new EagerLoader();
$this->assertTrue($loader->autoFields());
$this->assertFalse($loader->autoFields(false));
$this->assertFalse($loader->autoFields());
});
}

/**
* Test for enableAutoFields()
*
* @return void
*/
public function testEnableAutoFields()
{
$loader = new EagerLoader();
$this->assertTrue($loader->isAutoFieldsEnabled());
$this->assertSame($loader, $loader->enableAutoFields(false));
$this->assertFalse($loader->isAutoFieldsEnabled());
}

/**
* Helper function sued to quoted both keys and values in an array in case
* the test suite is running with auto quoting enabled
Expand Down

0 comments on commit 73e07a1

Please sign in to comment.