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:
@@ -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().');
|
||||
|
Reference in New Issue
Block a user