From 0143a5a6ca16c07aee1a5c1275ae324b1c8c5a0f Mon Sep 17 00:00:00 2001 From: Ashley Hindle Date: Sun, 20 Jan 2019 18:35:14 +0000 Subject: [PATCH] Improve unit tests for Config and Transformer --- tests/PrivateDump/ConfigTest.php | 2 ++ tests/PrivateDump/TransformerTest.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/PrivateDump/ConfigTest.php b/tests/PrivateDump/ConfigTest.php index 5e8fb34..5102d14 100644 --- a/tests/PrivateDump/ConfigTest.php +++ b/tests/PrivateDump/ConfigTest.php @@ -15,7 +15,9 @@ public function weCanOverrideConnectionConfig() 'password' => 'expelliarmus' ]]); + $this->assertEquals('root', $this->config->get('connection.username')); $this->assertEquals('expelliarmus', $this->config->get('connection.password')); + $this->assertEquals('localhost', $this->config->get('connection.hostname')); } /** @test */ diff --git a/tests/PrivateDump/TransformerTest.php b/tests/PrivateDump/TransformerTest.php index 43a6425..3fcba3a 100644 --- a/tests/PrivateDump/TransformerTest.php +++ b/tests/PrivateDump/TransformerTest.php @@ -21,7 +21,7 @@ public function nonFakerTransformersWork() $this->assertRegExp('/[0-9]{13}/', $this->transformer->transform('test', 'barcodeEan13')); $this->assertRegExp('/[0-9]{8}/', $this->transformer->transform('test', 'barcodeEan8')); $this->assertRegExp('/[0-9]{13}/', $this->transformer->transform('test', 'isbn13')); - $this->assertRegExp('/[0-9]{10}/', $this->transformer->transform('test', 'isbn10')); + $this->assertRegExp('/[0-9A-Z]{10}/', $this->transformer->transform('test', 'isbn10')); $this->assertEquals('TEST', $this->transformer->transform('tEsT', 'uppercase')); $this->assertEquals('test', $this->transformer->transform('tEsT', 'lowercase'));