-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Phpstan installed, but won't run in CI
- Loading branch information
Juan Pablo Ramirez
committed
Oct 20, 2020
1 parent
6fa8ad7
commit a7e10e1
Showing
8 changed files
with
142 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
parameters: | ||
level: max | ||
checkMissingIterableValueType: false | ||
bootstrapFiles: | ||
- tests/bootstrap.php | ||
paths: | ||
- src/ | ||
- tests/TestApp |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
/** | ||
* Licensed under The MIT License | ||
* For full copyright and license information, please see the LICENSE.txt | ||
* Redistributions of files must retain the above copyright notice. | ||
* | ||
* @copyright Copyright (c) 2020 Juan Pablo Ramirez and Nicolas Masson | ||
* @link https://webrider.de/ | ||
* @since 1.0.0 | ||
* @license http://www.opensource.org/licenses/mit-license.php MIT License | ||
*/ | ||
|
||
namespace TestCase; | ||
|
||
use CakephpTestSuiteLight\FixtureInjector; | ||
use CakephpTestSuiteLight\FixtureManager; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class FixtureInjectorTest extends TestCase | ||
{ | ||
/** | ||
* @var FixtureInjector | ||
*/ | ||
public $FixtureInjector; | ||
|
||
public function setUp() | ||
{ | ||
$this->FixtureInjector = new FixtureInjector(new FixtureManager(), true); | ||
} | ||
|
||
/** | ||
* Start test should work for PHPUnit TestCase | ||
*/ | ||
public function testStartTestWithPhpunitTestCase() | ||
{ | ||
$test = $this->createMock(TestCase::class); | ||
$this->FixtureInjector->startTest($test); | ||
$this->assertTrue(true); | ||
} | ||
|
||
/** | ||
* Start test should work for CakePHP TestCase | ||
*/ | ||
public function testStartTestWithCakeTestCase() | ||
{ | ||
$test = $this->createMock(\Cake\TestSuite\TestCase::class); | ||
$this->FixtureInjector->startTest($test); | ||
$this->assertTrue(true); | ||
} | ||
|
||
/** | ||
* End test should work for PHPUnit TestCase | ||
*/ | ||
public function testEndTestWithPhpunitTestCase() | ||
{ | ||
$test = $this->createMock(TestCase::class); | ||
$this->FixtureInjector->endTest($test, 0); | ||
$this->assertTrue(true); | ||
} | ||
|
||
/** | ||
* End test should work for CakePHP TestCase | ||
*/ | ||
public function testEndTestWithCakeTestCase() | ||
{ | ||
$test = $this->createMock(\Cake\TestSuite\TestCase::class); | ||
$this->FixtureInjector->endTest($test, 0); | ||
$this->assertTrue(true); | ||
} | ||
} |