Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Providing tests for proposal #804

  • Loading branch information...
commit 30690de6bac040ef6038e609e243c2ef2b43037e 1 parent 93f9fc8
@Gamesh Gamesh authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 test/testsuite/runtime/om/BaseObjectTest.php
View
20 test/testsuite/runtime/om/BaseObjectTest.php
@@ -60,6 +60,26 @@ public function testSetVirtualColumn()
$this->assertEquals('baz', $b->getVirtualColumn('foo'), 'setVirtualColumn() can modify the value of an existing virtual column');
$this->assertEquals($b, $b->setVirtualColumn('foo', 'bar'), 'setVirtualColumn() returns the current object');
}
+
+ public function testSetNewReturnsSelf()
+ {
+ $b = new TestableBaseObject();
+ $this->assertInstanceOf('TestableBaseObject', $b->setNew(false));
+ $this->assertInstanceOf('TestableBaseObject', $b->setNew(true));
+ }
+
+ public fucntion testSetDeletedReturnsSelf()
+ {
+ $b = new TestableBaseObject();
+ $this->assertInstanceOf('TestableBaseObject', $b->setDeleted(false));
+ $this->assertInstanceOf('TestableBaseObject', $b->setDeleted(true));
+ }
+
+ public function testResetModifiedReturnsSelf()
+ {
+ $b = new TestableBaseObject();
+ $this->assertInstanceOf('TestableBaseObject', $b->resetModified());
+ }
}
class TestableBaseObject extends BaseObject
Please sign in to comment.
Something went wrong with that request. Please try again.