From 7dfd205fcc5697a2a1c51fde8f4cfacb7e32bfb0 Mon Sep 17 00:00:00 2001 From: "Thomas A. Hirsch" Date: Tue, 23 Jan 2024 10:50:55 +0100 Subject: [PATCH] Added testcase for pr #110 --- tests/Ticket/gh110TestCase.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/Ticket/gh110TestCase.php diff --git a/tests/Ticket/gh110TestCase.php b/tests/Ticket/gh110TestCase.php new file mode 100644 index 000000000..baee0161c --- /dev/null +++ b/tests/Ticket/gh110TestCase.php @@ -0,0 +1,31 @@ +buildDefinition( + array( + 'className' => 'Ticket_gh110_TestRecord', + 'topLevelClassName' => 'Ticket_gh110_TestRecord', + 'is_base_class' => true, + 'columns' => array( + 'id' => array( + 'type' => 'integer', + 'length' => 4, + ) + ), + 'actAs' => array( + 'SoftDelete' => array(), + 'Timestampable' => array(), + ) + ) + ); + + $this->assertTrue(preg_match('/@property int\s*\$id/', $class)); + $this->assertTrue(preg_match('/@property string\s*\$deleted_at/', $class)); + $this->assertTrue(preg_match('/@property string\s*\$created_at/', $class)); + $this->assertTrue(preg_match('/@property string\s*\$updated_at/', $class)); + } +}