Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
48
vendor/doctrine/rst-parser/tests/Builder/CopierTest.php
vendored
Normal file
48
vendor/doctrine/rst-parser/tests/Builder/CopierTest.php
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\Tests\RST\Builder;
|
||||
|
||||
use Doctrine\RST\Builder\Copier;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
|
||||
class CopierTest extends TestCase
|
||||
{
|
||||
/** @var Filesystem|MockObject */
|
||||
private $filesystem;
|
||||
|
||||
/** @var Copier */
|
||||
private $copier;
|
||||
|
||||
public function testDoCopy(): void
|
||||
{
|
||||
$this->filesystem->expects(self::once())
|
||||
->method('copy')
|
||||
->with('/source/from', '/target/to');
|
||||
|
||||
$this->copier->copy('from', 'to');
|
||||
|
||||
$this->copier->doCopy('/source', '/target');
|
||||
}
|
||||
|
||||
public function testDoMkdir(): void
|
||||
{
|
||||
$this->filesystem->expects(self::once())
|
||||
->method('mkdir')
|
||||
->with('/target/directory');
|
||||
|
||||
$this->copier->mkdir('directory');
|
||||
|
||||
$this->copier->doMkdir('/target');
|
||||
}
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->filesystem = $this->createMock(Filesystem::class);
|
||||
|
||||
$this->copier = new Copier($this->filesystem);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue