Providing tests for proposal #804 #805

Merged
merged 2 commits into from Feb 17, 2014

Projects

None yet

4 participants

Contributor
Gamesh commented Dec 18, 2013

P.S. You should realy use getMockForAbstractClass instead defining a new class to test and abstract object.

Member
staabm commented Dec 31, 2013

@willdurand this tests also should be merged as coverage for #804

@stood stood commented on an outdated diff Feb 16, 2014
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()
stood
stood Feb 16, 2014 Contributor

error syntax: change fucntion to function

Member
staabm commented Feb 17, 2014

lgtm, thanks.

@willdurand willdurand merged commit feb6604 into propelorm:master Feb 17, 2014

1 check passed

default The Travis CI build passed
Details
Owner

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment