Loading tests/src/Unit/process/SkipOnValueTest.php +34 −0 Changes for tests/src/Unit/process/SkipOnValueTest.php: 34 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,23 @@ class SkipOnValueTest extends MigrateProcessTestCase { ->transform('86', $this->migrateExecutable, $this->row, 'destinationproperty'); } /** * Tests that a skip process exception with a message is raised. * * @covers ::process */ public function testProcessSkipWithMessage() { $configuration = [ 'method' => 'process', 'value' => 86, 'message' => 'The value is 86', ]; $process = new SkipOnValue($configuration, 'skip_on_value', []); $this->expectException(MigrateSkipProcessException::class); $this->expectExceptionMessage('The value is 86'); $process->transform(86, $this->migrateExecutable, $this->row, 'destination_property'); } /** * @covers ::process */ Loading Loading @@ -106,6 +123,23 @@ class SkipOnValueTest extends MigrateProcessTestCase { ->transform('86', $this->migrateExecutable, $this->row, 'destinationproperty'); } /** * Tests that a skip row exception with a message is raised. * * @covers ::row */ public function testRowSkipWithMessage() { $configuration = [ 'method' => 'row', 'value' => 86, 'message' => 'The value is 86', ]; $process = new SkipOnValue($configuration, 'skip_on_value', []); $this->expectException(MigrateSkipRowException::class); $this->expectExceptionMessage('The value is 86'); $process->transform(86, $this->migrateExecutable, $this->row, 'destination_property'); } /** * @covers ::row */ Loading Loading
tests/src/Unit/process/SkipOnValueTest.php +34 −0 Changes for tests/src/Unit/process/SkipOnValueTest.php: 34 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,23 @@ class SkipOnValueTest extends MigrateProcessTestCase { ->transform('86', $this->migrateExecutable, $this->row, 'destinationproperty'); } /** * Tests that a skip process exception with a message is raised. * * @covers ::process */ public function testProcessSkipWithMessage() { $configuration = [ 'method' => 'process', 'value' => 86, 'message' => 'The value is 86', ]; $process = new SkipOnValue($configuration, 'skip_on_value', []); $this->expectException(MigrateSkipProcessException::class); $this->expectExceptionMessage('The value is 86'); $process->transform(86, $this->migrateExecutable, $this->row, 'destination_property'); } /** * @covers ::process */ Loading Loading @@ -106,6 +123,23 @@ class SkipOnValueTest extends MigrateProcessTestCase { ->transform('86', $this->migrateExecutable, $this->row, 'destinationproperty'); } /** * Tests that a skip row exception with a message is raised. * * @covers ::row */ public function testRowSkipWithMessage() { $configuration = [ 'method' => 'row', 'value' => 86, 'message' => 'The value is 86', ]; $process = new SkipOnValue($configuration, 'skip_on_value', []); $this->expectException(MigrateSkipRowException::class); $this->expectExceptionMessage('The value is 86'); $process->transform(86, $this->migrateExecutable, $this->row, 'destination_property'); } /** * @covers ::row */ Loading