Skip to content

Commit 37b5963

Browse files
authored
Merge pull request #90 from magento/UnitTest-for-LiteralNamespaces
Added unit test for LiteralNamespaces sniff
2 parents cc96a93 + eadaaac commit 37b5963

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
class Fixture
4+
{
5+
public function ok()
6+
{
7+
$this->create(Magento\CustomerSegment\Model\Segment\Condition\Customer\Address::class);
8+
}
9+
10+
public function notOk()
11+
{
12+
$this->create('Magento\CustomerSegment\Model\Segment\Condition\Customer\Address');
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
/**
3+
* Copyright © Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento2\Tests\PHP;
7+
8+
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
9+
10+
/**
11+
* Class LiteralNamespacesUnitTest
12+
*/
13+
class LiteralNamespacesUnitTest extends AbstractSniffUnitTest
14+
{
15+
/**
16+
* @inheritdoc
17+
*/
18+
public function getErrorList()
19+
{
20+
return [];
21+
}
22+
23+
/**
24+
* @inheritdoc
25+
*/
26+
public function getWarningList()
27+
{
28+
return [
29+
12 => 1,
30+
];
31+
}
32+
}

0 commit comments

Comments
 (0)