mirror of
https://github.com/stan220/testcontainers-php.git
synced 2026-09-08 17:29:29 +00:00
Added test for GenericContainer implementation + implemented exec related stuff
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Testcontainers\Tests\Integration;
|
||||
|
||||
use Testcontainers\Container\GenericContainer;
|
||||
|
||||
class GenericContainerTest extends ContainerTestCase
|
||||
{
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
self::$container = (new GenericContainer('alpine'))
|
||||
->withCommand(['tail', '-f', '/dev/null'])
|
||||
->start();
|
||||
}
|
||||
|
||||
public function testExec(): void
|
||||
{
|
||||
$actual = self::$container->exec(['echo', 'testcontainers']);
|
||||
self::assertSame('testcontainers', $actual);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user