public function testAssertNoDifferenceFalse() { try { $diff = $this->assertNoDifference('UnitTest::count()'); UnitTest::create(array('string_value' => 'foo bar', 'integer_value' => 12345, 'email_value' => '*****@*****.**')); $diff->end(); } catch (Exception $e) { } $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError); }
public function testSaveInsertZeroOnPrimaryKey() { $test = UnitTest::create(array('id' => 0, 'integer_value' => 123, 'string_value' => 'asdf', 'email_value' => '*****@*****.**')); $this->assertFalse(UnitTest::exists(0)); $test = UnitTest::find('first', array('conditions' => "string_value = 'asdf'")); $this->assertInstanceOf('UnitTest', $test); }