1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-08 23:26:49 +02:00

DibiObject replaced with trait DibiStrict

This commit is contained in:
David Grudl
2015-10-06 12:54:27 +02:00
parent 76396ab250
commit f42d1b1611
39 changed files with 116 additions and 39 deletions

View File

@@ -5,12 +5,9 @@ use Tester\Assert;
require __DIR__ . '/bootstrap.php';
class TestClass extends DibiObject
class TestClass
{
public function callParent()
{
parent::callParent();
}
use DibiStrict;
public function getBar()
{
@@ -23,6 +20,14 @@ class TestClass extends DibiObject
}
}
class TestChild extends TestClass
{
public function callParent()
{
parent::callParent();
}
}
// calling
Assert::exception(function () {
@@ -35,7 +40,7 @@ Assert::exception(function () {
}, 'LogicException', 'Call to undefined static method TestClass::undeclared().');
Assert::exception(function () {
$obj = new TestClass;
$obj = new TestChild;
$obj->callParent();
}, 'LogicException', 'Call to undefined method parent::callParent().');