Skip to content
Permalink
Browse files

Change namespace to Port

  • Loading branch information...
ddeboer committed May 30, 2015
1 parent df6b456 commit 9945b575a690b3ee4ad0303099d8e6a4dd96f4d4
Showing with 328 additions and 317 deletions.
  1. +3 −1 .travis.yml
  2. +11 −2 composer.json
  3. +3 −3 spec/Exception/DuplicateHeadersExceptionSpec.php
  4. +3 −3 spec/Exception/MappingExceptionSpec.php
  5. +3 −3 spec/Exception/ReaderExceptionSpec.php
  6. +3 −3 spec/Exception/SourceNotFoundExceptionSpec.php
  7. +3 −3 spec/Exception/UnexpectedTypeExceptionSpec.php
  8. +3 −3 spec/Exception/UnexpectedValueExceptionSpec.php
  9. +3 −3 spec/Exception/ValidationExceptionSpec.php
  10. +3 −3 spec/Exception/WriterExceptionSpec.php
  11. +3 −3 spec/Filter/DateTimeThresholdFilterSpec.php
  12. +2 −2 spec/Filter/OffsetFilterSpec.php
  13. +3 −3 spec/Filter/ValidatorFilterSpec.php
  14. +3 −3 spec/Reader/Factory/CsvReaderFactorySpec.php
  15. +3 −3 spec/Reader/Factory/DbalReaderFactorySpec.php
  16. +3 −3 spec/Reader/Factory/DoctrineReaderFactorySpec.php
  17. +3 −3 spec/Reader/Factory/ExcelReaderFactorySpec.php
  18. +2 −2 spec/ResultSpec.php
  19. +1 −1 src/Exception.php
  20. +1 −1 src/Exception/DuplicateHeadersException.php
  21. +2 −2 src/Exception/MappingException.php
  22. +1 −1 src/Exception/ReaderException.php
  23. +2 −2 src/Exception/SourceNotFoundException.php
  24. +1 −1 src/Exception/UnexpectedTypeException.php
  25. +2 −2 src/Exception/UnexpectedValueException.php
  26. +2 −2 src/Exception/ValidationException.php
  27. +2 −2 src/Exception/WriterException.php
  28. +2 −2 src/Filter/DateTimeThresholdFilter.php
  29. +1 −1 src/Filter/OffsetFilter.php
  30. +2 −2 src/Filter/ValidatorFilter.php
  31. +1 −1 src/Reader.php
  32. +1 −1 src/Reader/ArrayReader.php
  33. +1 −1 src/Reader/CountableIteratorReader.php
  34. +2 −2 src/Reader/CountableReader.php
  35. +2 −2 src/Reader/CsvReader.php
  36. +1 −1 src/Reader/DbalReader.php
  37. +1 −1 src/Reader/DoctrineReader.php
  38. +1 −1 src/Reader/ExcelReader.php
  39. +2 −2 src/Reader/Factory/CsvReaderFactory.php
  40. +2 −2 src/Reader/Factory/DbalReaderFactory.php
  41. +2 −2 src/Reader/Factory/DoctrineReaderFactory.php
  42. +2 −2 src/Reader/Factory/ExcelReaderFactory.php
  43. +2 −2 src/Reader/IteratorReader.php
  44. +3 −3 src/Reader/OneToManyReader.php
  45. +1 −1 src/Reader/PdoReader.php
  46. +2 −2 src/Result.php
  47. +1 −1 src/Step.php
  48. +3 −3 src/Step/ConverterStep.php
  49. +2 −2 src/Step/FilterStep.php
  50. +3 −3 src/Step/MappingStep.php
  51. +2 −2 src/Step/PriorityStep.php
  52. +2 −2 src/Step/ValidatorStep.php
  53. +2 −2 src/Step/ValueConverterStep.php
  54. +1 −1 src/ValueConverter/ArrayValueConverterMap.php
  55. +2 −2 src/ValueConverter/CharsetValueConverter.php
  56. +2 −2 src/ValueConverter/DateTimeToStringValueConverter.php
  57. +2 −2 src/ValueConverter/DateTimeValueConverter.php
  58. +2 −2 src/ValueConverter/MappingValueConverter.php
  59. +2 −2 src/ValueConverter/ObjectConverter.php
  60. +1 −1 src/ValueConverter/StringToObjectConverter.php
  61. +1 −1 src/Workflow.php
  62. +10 −10 src/Workflow/StepAggregator.php
  63. +1 −1 src/Writer.php
  64. +2 −2 src/Writer/AbstractStreamWriter.php
  65. +2 −2 src/Writer/ArrayWriter.php
  66. +2 −2 src/Writer/BatchWriter.php
  67. +2 −2 src/Writer/CallbackWriter.php
  68. +3 −3 src/Writer/ConsoleProgressWriter.php
  69. +2 −2 src/Writer/ConsoleTableWriter.php
  70. +1 −1 src/Writer/CsvWriter.php
  71. +2 −2 src/Writer/DoctrineWriter.php
  72. +2 −2 src/Writer/ExcelWriter.php
  73. +1 −1 src/Writer/FlushableWriter.php
  74. +3 −3 src/Writer/PdoWriter.php
  75. +1 −1 src/Writer/StreamMergeWriter.php
  76. +1 −1 src/Writer/WriterTemplate.php
  77. +3 −3 tests/Filter/DateTimeFilterTest.php
  78. +2 −2 tests/Filter/OffsetFilterTest.php
  79. +3 −3 tests/Filter/ValidationFilterTest.php
  80. +2 −2 tests/Fixtures/Entity/TestEntity.php
  81. +1 −1 tests/Fixtures/Entity/User.php
  82. +2 −2 tests/Reader/CountableIteratorReaderTest.php
  83. +3 −3 tests/Reader/CsvReaderTest.php
  84. +2 −2 tests/Reader/DbalReaderTest.php
  85. +5 −5 tests/Reader/DoctrineReaderTest.php
  86. +2 −2 tests/Reader/ExcelReaderTest.php
  87. +4 −4 tests/Reader/Factory/CsvReaderFactoryTest.php
  88. +3 −3 tests/Reader/Factory/DbalReaderFactoryTest.php
  89. +4 −4 tests/Reader/Factory/DoctrineReaderFactoryTest.php
  90. +4 −4 tests/Reader/Factory/ExcelReaderFactoryTest.php
  91. +2 −2 tests/Reader/IteratorReaderTest.php
  92. +7 −7 tests/Reader/OneToManyReaderTest.php
  93. +2 −2 tests/Reader/PdoReaderTest.php
  94. +2 −2 tests/ResultTest.php
  95. +2 −2 tests/Step/ConverterStepTest.php
  96. +2 −2 tests/Step/FilterStepTest.php
  97. +2 −2 tests/Step/MappingStepTest.php
  98. +3 −3 tests/Step/ValidatorStepTest.php
  99. +2 −2 tests/Step/ValueConverterStepTest.php
  100. +3 −3 tests/ValueConverter/ArrayValueConverterMapTest.php
  101. +2 −2 tests/ValueConverter/CharsetValueConverterTest.php
  102. +3 −3 tests/ValueConverter/DateTimeToStringValueConverterTest.php
  103. +2 −2 tests/ValueConverter/DateTimeValueConverterTest.php
  104. +3 −3 tests/ValueConverter/MappingValueConverterTest.php
  105. +3 −3 tests/ValueConverter/ObjectConverterTest.php
  106. +2 −2 tests/ValueConverter/StringToObjectConverterTest.php
  107. +29 −29 tests/WorkflowTest.php
  108. +3 −3 tests/Writer/AbstractStreamWriterTest.php
  109. +4 −4 tests/Writer/BatchWriterTest.php
  110. +2 −2 tests/Writer/CallbackWriterTest.php
  111. +4 −4 tests/Writer/ConsoleProgressWriterTest.php
  112. +5 −5 tests/Writer/ConsoleTableWriterTest.php
  113. +2 −2 tests/Writer/CsvWriterTest.php
  114. +6 −6 tests/Writer/DoctrineWriterTest.php
  115. +2 −2 tests/Writer/ExcelWriterTest.php
  116. +6 −6 tests/Writer/PdoWriterTest.php
  117. +13 −13 tests/Writer/StreamMergeWriterTest.php
  118. +2 −2 tests/Writer/StreamWriterTest.php
@@ -24,7 +24,9 @@ install:
- if [[ "$TRAVIS_PHP_VERSION" == "hhvm" ]]; then composer require mongofill/mongofill=dev-master --no-update; fi
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction

script: phpunit ${PHPUNIT_FLAGS}
script:
- vendor/bin/phpunit
- vendor/bin/phpspec run

after_script:
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
@@ -24,16 +24,25 @@
"docs": "https://portphp.readthedocs.org"
},
"require": {
"php": ">=5.4.0"
"php": ">=5.4.0",
"psr/log": "~1.0"
},
"autoload": {
"psr-4": {
"Port\\": "src/"
}
},
"require-dev": {
"ext-iconv": "*",
"ext-mbstring": "*",
"ext-sqlite3": "*",
"phpunit/phpunit": "^4.0",
"phpspec/phpspec": "^2.1"
"phpspec/phpspec": "^2.1",
"doctrine/dbal": "~2.4",
"doctrine/orm": "~2.4",
"phpoffice/phpexcel": "~1.8",
"symfony/property-access": "2.3",
"symfony/validator": "~2.3"
},
"autoload-dev": {
"psr-4": {
@@ -1,6 +1,6 @@
<?php
namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;
use PhpSpec\ObjectBehavior;
@@ -13,12 +13,12 @@ function let()
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\DuplicateHeadersException');
$this->shouldHaveType('Port\Exception\DuplicateHeadersException');
}
function it_is_a_reader_exception()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\ReaderException');
$this->shouldHaveType('Port\Exception\ReaderException');
}
function it_has_a_message()
@@ -1,19 +1,19 @@
<?php
namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;
use PhpSpec\ObjectBehavior;
class MappingExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\MappingException');
$this->shouldHaveType('Port\Exception\MappingException');
}
function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
@@ -1,19 +1,19 @@
<?php
namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;
use PhpSpec\ObjectBehavior;
class ReaderExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\ReaderException');
$this->shouldHaveType('Port\Exception\ReaderException');
}
function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
@@ -1,19 +1,19 @@
<?php
namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;
use PhpSpec\ObjectBehavior;
class SourceNotFoundExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\SourceNotFoundException');
$this->shouldHaveType('Port\Exception\SourceNotFoundException');
}
function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
@@ -1,6 +1,6 @@
<?php
namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;
use PhpSpec\ObjectBehavior;
@@ -13,12 +13,12 @@ public function let()
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\UnexpectedTypeException');
$this->shouldHaveType('Port\Exception\UnexpectedTypeException');
}
function it_is_an_unexpected_value_exception()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\UnexpectedValueException');
$this->shouldHaveType('Port\Exception\UnexpectedValueException');
}
function it_has_a_message_with_scalar_type()
@@ -1,18 +1,18 @@
<?php
namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;
use PhpSpec\ObjectBehavior;
class UnexpectedValueExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\UnexpectedValueException');
$this->shouldHaveType('Port\Exception\UnexpectedValueException');
}
function it_is_an_exception()
{
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
@@ -1,6 +1,6 @@
<?php
namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;
use PhpSpec\ObjectBehavior;
use Symfony\Component\Validator\ConstraintViolationListInterface;
@@ -14,13 +14,13 @@ function let(ConstraintViolationListInterface $list)
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\ValidationException');
$this->shouldHaveType('Port\Exception\ValidationException');
}
function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
function it_has_a_list_of_violations(ConstraintViolationListInterface $list)
@@ -1,19 +1,19 @@
<?php
namespace spec\Ddeboer\DataImport\Exception;
namespace spec\Port\Exception;
use PhpSpec\ObjectBehavior;
class WriterExceptionSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Exception\WriterException');
$this->shouldHaveType('Port\Exception\WriterException');
}
function it_is_an_exception()
{
$this->shouldHaveType('Exception');
$this->shouldImplement('Ddeboer\DataImport\Exception');
$this->shouldImplement('Port\Exception');
}
}
@@ -1,8 +1,8 @@
<?php
namespace spec\Ddeboer\DataImport\Filter;
namespace spec\Port\Filter;
use Ddeboer\DataImport\ValueConverter\DateTimeValueConverter;
use Port\ValueConverter\DateTimeValueConverter;
use PhpSpec\ObjectBehavior;
class DateTimeThresholdFilterSpec extends ObjectBehavior
@@ -14,7 +14,7 @@ function let(DateTimeValueConverter $valueConverter)
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Filter\DateTimeThresholdFilter');
$this->shouldHaveType('Port\Filter\DateTimeThresholdFilter');
}
function it_throws_an_exception_when_no_threshold_is_set()
@@ -1,6 +1,6 @@
<?php
namespace spec\Ddeboer\DataImport\Filter;
namespace spec\Port\Filter;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
@@ -9,7 +9,7 @@ class OffsetFilterSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Filter\OffsetFilter');
$this->shouldHaveType('Port\Filter\OffsetFilter');
}
function it_does_not_limit_by_default()
@@ -1,6 +1,6 @@
<?php
namespace spec\Ddeboer\DataImport\Filter;
namespace spec\Port\Filter;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintViolationList;
@@ -32,7 +32,7 @@ function let(ValidatorInterface $validator)
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Filter\ValidatorFilter');
$this->shouldHaveType('Port\Filter\ValidatorFilter');
}
function it_validates_an_item(ValidatorInterface $validator, Constraint $constraint, ConstraintViolationList $list)
@@ -77,7 +77,7 @@ function it_validates_an_item_and_the_validation_fails_with_exception(ValidatorI
$this->throwExceptions(true);
$this->add('key1', $constraint);
$this->shouldThrow('Ddeboer\DataImport\Exception\ValidationException')->during__invoke($this->item1);
$this->shouldThrow('Port\Exception\ValidationException')->during__invoke($this->item1);
$this->getViolations()->shouldReturn([1 => $list]);
}
@@ -1,20 +1,20 @@
<?php
namespace spec\Ddeboer\DataImport\Reader\Factory;
namespace spec\Port\Reader\Factory;
use PhpSpec\ObjectBehavior;
class CsvReaderFactorySpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\CsvReaderFactory');
$this->shouldHaveType('Port\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');
$this->getReader($file)->shouldHaveType('Port\Reader\CsvReader');
}
}
@@ -1,6 +1,6 @@
<?php
namespace spec\Ddeboer\DataImport\Reader\Factory;
namespace spec\Port\Reader\Factory;
use Doctrine\DBAL\Connection;
use PhpSpec\ObjectBehavior;
@@ -14,11 +14,11 @@ function let(Connection $dbal)
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\DbalReaderFactory');
$this->shouldHaveType('Port\Reader\Factory\DbalReaderFactory');
}
function it_creates_a_reader()
{
$this->getReader('SQL', [])->shouldHaveType('Ddeboer\DataImport\Reader\DbalReader');
$this->getReader('SQL', [])->shouldHaveType('Port\Reader\DbalReader');
}
}
@@ -1,6 +1,6 @@
<?php
namespace spec\Ddeboer\DataImport\Reader\Factory;
namespace spec\Port\Reader\Factory;
use Doctrine\Common\Persistence\ObjectManager;
use PhpSpec\ObjectBehavior;
@@ -14,11 +14,11 @@ function let(ObjectManager $objectManager)
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\DoctrineReaderFactory');
$this->shouldHaveType('Port\Reader\Factory\DoctrineReaderFactory');
}
function it_creates_a_reader()
{
$this->getReader('Entity')->shouldHaveType('Ddeboer\DataImport\Reader\DoctrineReader');
$this->getReader('Entity')->shouldHaveType('Port\Reader\DoctrineReader');
}
}
@@ -1,20 +1,20 @@
<?php
namespace spec\Ddeboer\DataImport\Reader\Factory;
namespace spec\Port\Reader\Factory;
use PhpSpec\ObjectBehavior;
class ExcelReaderFactorySpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Reader\Factory\ExcelReaderFactory');
$this->shouldHaveType('Port\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');
$this->getReader($file)->shouldHaveType('Port\Reader\ExcelReader');
}
}
@@ -1,6 +1,6 @@
<?php
namespace spec\Ddeboer\DataImport;
namespace spec\Port;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
@@ -16,7 +16,7 @@ function let(\DateTime $startTime, \DateTime $endTime, \SplObjectStorage $except
function it_is_initializable()
{
$this->shouldHaveType('Ddeboer\DataImport\Result');
$this->shouldHaveType('Port\Result');
}
function it_has_a_name()

0 comments on commit 9945b57

Please sign in to comment.
You can’t perform that action at this time.