complete tests

This commit is contained in:
Daniel Seifert 2024-06-16 22:49:46 +02:00
parent 2706d0a596
commit f419368b33
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170

View File

@ -24,8 +24,10 @@ use D3\TestingTools\Tests\Unit\Production\HelperClasses\IsMockableParent;
use Exception;
use Generator;
use OxidEsales\Eshop\Application\Model\Article;
use OxidEsales\Eshop\Core\Config;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
use ReflectionException;
class IsMockableTest extends TestCase
@ -119,6 +121,48 @@ class IsMockableTest extends TestCase
);
}
/**
* @test
* @return void
* @throws ReflectionException
* @covers \D3\TestingTools\Production\IsMockable::d3GetMockableRegistryObject
*/
public function canGetMockableRegistryObject(): void
{
/** @var MockObject $mock */
$mock = new(IsMockableClass::class);
$this->assertInstanceOf(
Config::class,
$this->callMethod(
$mock,
'd3GetMockableRegistryObject',
[Config::class]
)
);
}
/**
* @test
* @return void
* @throws ReflectionException
* @covers \D3\TestingTools\Production\IsMockable::d3GetMockableLogger
*/
public function canGetMockableLogger()
{
/** @var MockObject $mock */
$mock = new(IsMockableClass::class);
$this->assertInstanceOf(
LoggerInterface::class,
$this->callMethod(
$mock,
'd3GetMockableLogger',
[Config::class]
)
);
}
/**
* @param int $length
*