-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aac4a0e
commit 4875435
Showing
6 changed files
with
131 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
tests/bitExpert/PHPStan/Magento/Autoload/DataProvider/ClassyDataProviderUnitTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/* | ||
* This file is part of the phpstan-magento package. | ||
* | ||
* (c) bitExpert AG | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace bitExpert\PHPStan\Magento\Autoload\DataProvider; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
class ClassyDataProviderUnitTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function returnsTrueForFoundClassyConstructsInCurrentDirectory(): void | ||
{ | ||
$dataprovider = new ClassyDataProvider(__DIR__); | ||
|
||
static::assertTrue($dataprovider->exists(ClassyDataProviderUnitTest::class)); | ||
static::assertTrue($dataprovider->exists(ExtensionAttributeDataProviderUnitTest::class)); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function returnsFalseWhenDirectoryNotExists(): void | ||
{ | ||
$dataprovider = new ClassyDataProvider(__DIR__ . '/not-exists'); | ||
|
||
static::assertFalse($dataprovider->exists(ClassyDataProviderUnitTest::class)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters