From eadaaac93e1fce3932804ed449799f671ffef53e Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Wed, 24 Apr 2019 15:57:30 -0500 Subject: [PATCH] Added unit test for LiteralNamespace sniff --- .../Tests/PHP/LiteralNamespacesUnitTest.inc | 14 ++++++++ .../Tests/PHP/LiteralNamespacesUnitTest.php | 32 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Magento2/Tests/PHP/LiteralNamespacesUnitTest.inc create mode 100644 Magento2/Tests/PHP/LiteralNamespacesUnitTest.php diff --git a/Magento2/Tests/PHP/LiteralNamespacesUnitTest.inc b/Magento2/Tests/PHP/LiteralNamespacesUnitTest.inc new file mode 100644 index 00000000..d6880b37 --- /dev/null +++ b/Magento2/Tests/PHP/LiteralNamespacesUnitTest.inc @@ -0,0 +1,14 @@ +create(Magento\CustomerSegment\Model\Segment\Condition\Customer\Address::class); + } + + public function notOk() + { + $this->create('Magento\CustomerSegment\Model\Segment\Condition\Customer\Address'); + } +} diff --git a/Magento2/Tests/PHP/LiteralNamespacesUnitTest.php b/Magento2/Tests/PHP/LiteralNamespacesUnitTest.php new file mode 100644 index 00000000..9a22dace --- /dev/null +++ b/Magento2/Tests/PHP/LiteralNamespacesUnitTest.php @@ -0,0 +1,32 @@ + 1, + ]; + } +}