Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace spec\Ddeboer\DataImport\Reader\Factory;
use PhpSpec\ObjectBehavior;
class CsvReaderFactorySpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\CsvReaderFactory');
}
function it_creates_a_reader()
{
$file = new \SplFileObject(tempnam(sys_get_temp_dir(), null));
$this->getReader($file)->shouldHaveType('Ddeboer\DataImport\Reader\CsvReader');
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace spec\Ddeboer\DataImport\Reader\Factory;
use Doctrine\DBAL\Connection;
use PhpSpec\ObjectBehavior;
class DbalReaderFactorySpec extends ObjectBehavior
{
function let(Connection $dbal)
{
$this->beConstructedWith($dbal);
}
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\DbalReaderFactory');
}
function it_creates_a_reader()
{
$this->getReader('SQL', [])->shouldHaveType('Ddeboer\DataImport\Reader\DbalReader');
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace spec\Ddeboer\DataImport\Reader\Factory;
use Doctrine\Common\Persistence\ObjectManager;
use PhpSpec\ObjectBehavior;
class DoctrineReaderFactorySpec extends ObjectBehavior
{
function let(ObjectManager $objectManager)
{
$this->beConstructedWith($objectManager);
}
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\DoctrineReaderFactory');
}
function it_creates_a_reader()
{
$this->getReader('Entity')->shouldHaveType('Ddeboer\DataImport\Reader\DoctrineReader');
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace spec\Ddeboer\DataImport\Reader\Factory;
use PhpSpec\ObjectBehavior;
class ExcelReaderFactorySpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\ExcelReaderFactory');
}
function it_creates_a_reader()
{
$file = new \SplFileObject(tempnam(sys_get_temp_dir(), null));
$this->getReader($file)->shouldHaveType('Ddeboer\DataImport\Reader\ExcelReader');
}
}