Replace 0 to false and 1 to true in Config:;set(DEBUG...) in majestic tests.

This commit is contained in:
Alexander Demidov
2012-07-09 13:47:32 +04:00
parent dc60d703bf
commit b6a2c4dbc3
18 changed files with 101 additions and 101 deletions

View File

@ -64,7 +64,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testFind()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$result = $this->model->find();
$this->assertInstanceOf('MongoStatement', $result);
$this->assertEquals('milk', $result->limit(2)->order(array('name' => -1))->fetch()->name);
@ -81,7 +81,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testGet()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$result = $this->model->find()->limit(1)->order(array('name' => 1));
$result = $result->fetch();
$this->assertEquals('bread', $result->name);
@ -95,7 +95,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testDelete()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$result = $this->model->find()->limit(1)->order(array('name' => 1));
$id = $result->fetch()->_id;
$this->assertEquals(1, $this->model->delete($id));
@ -108,7 +108,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testBatchInsert()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$data = array(
array('name' => 'first object'),
array('name' => 'second object'),
@ -127,7 +127,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testDeleteAll()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$this->assertEquals(2, $this->model->count(array('name' => 'eggs')));
$this->assertEquals(0, $this->model->deleteAll(array('name' => 'eggs')));
@ -140,7 +140,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testCount()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$this->assertEquals(5, $this->model->count());
$this->assertEquals(2, $this->model->count(array('name' => 'eggs')));
}
@ -151,7 +151,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testFetch()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$mock = $this->getMock('CacheKey', array('set', 'get'));
$mock->expects($this->exactly(3))
@ -190,7 +190,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testUseMongoId()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$this->assertAttributeEquals(true, 'useMongoId', $this->model);
}
@ -201,7 +201,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testId()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$class = new ReflectionClass('MongoModel');
$prop = $class->getProperty('useMongoId');
$prop->setAccessible(true);
@ -221,7 +221,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
*/
public function testIdToMongoId()
{
Config::set('DEBUG', 0);
Config::set('DEBUG', false);
$this->model->insert(array('name' => 'testbread', 'price' => 3.2, 'quantity' => 10));
$this->model->insert(array('name' => 'testbread', 'price' => 12, 'quantity' => 2));