Code Duplication    Length = 11-11 lines in 2 locations

lib/Cake/Test/Case/Model/ModelWriteTest.php 2 locations

@@ 7221-7231 (lines=11) @@
7218
 *
7219
 * @return void
7220
 */
7221
	public function testUpdateAllBooleanConditions() {
7222
		$this->loadFixtures('Item', 'Syfile', 'Portfolio', 'Image', 'ItemsPortfolio');
7223
		$TestModel = new Item();
7224
7225
		$result = $TestModel->updateAll(array('published' => true), array('Item.id' => 1));
7226
		$this->assertTrue($result);
7227
		$result = $TestModel->find('first', array(
7228
			'fields' => array('id', 'published'),
7229
			'conditions' => array('Item.id' => 1)));
7230
		$this->assertEquals(true, $result['Item']['published']);
7231
	}
7232
7233
/**
7234
 * testUpdateBoolean
@@ 7238-7248 (lines=11) @@
7235
 *
7236
 * @return void
7237
 */
7238
	public function testUpdateBoolean() {
7239
		$this->loadFixtures('Item', 'Syfile', 'Portfolio', 'Image', 'ItemsPortfolio');
7240
		$TestModel = new Item();
7241
7242
		$result = $TestModel->save(array('published' => true, 'id' => 1));
7243
		$this->assertTrue((bool)$result);
7244
		$result = $TestModel->find('first', array(
7245
			'fields' => array('id', 'published'),
7246
			'conditions' => array('Item.id' => 1)));
7247
		$this->assertEquals(true, $result['Item']['published']);
7248
	}
7249
7250
/**
7251
 * Test the clear() method.