diff --git a/.travis.yml b/.travis.yml index 05d8546..6b5a1c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ language: php php: - 7.0 - 7.1 + - 7.2 before_script: - composer self-update diff --git a/src/Foundation/helpers.php b/src/Foundation/helpers.php index 04a61a1..d20b0a2 100644 --- a/src/Foundation/helpers.php +++ b/src/Foundation/helpers.php @@ -1,11 +1,10 @@ null, ]; - $result = format(request(), InstanceFailed::class, null); + $result = formatter(request(), InstanceFailed::class, null); $this->assertEquals($expected, $result); } @@ -344,7 +344,7 @@ public function it_should_format_and_customize_message_success_by_helper() 'items' => [], ]; - $result = format(request(), CustomSuccessMessage::class, []); + $result = formatter(request(), CustomSuccessMessage::class, []); $this->assertEquals($expected, $result); } @@ -363,7 +363,7 @@ public function it_should_format_and_customize_code_success_by_helper() 'items' => [], ]; - $result = format(request(), CustomSuccessCode::class, []); + $result = formatter(request(), CustomSuccessCode::class, []); $this->assertEquals($expected, $result); } @@ -384,7 +384,7 @@ public function it_should_format_and_customize_all_success_by_helper() 'items' => [], ]; - $result = format(request(), CustomSuccessAll::class, []); + $result = formatter(request(), CustomSuccessAll::class, []); $this->assertEquals($expected, $result); } @@ -405,7 +405,7 @@ public function it_should_format_and_customize_message_failed_by_helper() 'errors' => [], ]; - $result = format(request(), CustomFailedMessage::class, []); + $result = formatter(request(), CustomFailedMessage::class, []); $this->assertEquals($expected, $result); } @@ -424,7 +424,7 @@ public function it_should_format_and_customize_code_failed_by_helper() 'errors' => [], ]; - $result = format(request(), CustomFailedCode::class, []); + $result = formatter(request(), CustomFailedCode::class, []); $this->assertEquals($expected, $result); } @@ -445,7 +445,7 @@ public function it_should_format_and_customize_all_failed_by_helper() 'errors' => [], ]; - $result = format(request(), CustomFailedAll::class, []); + $result = formatter(request(), CustomFailedAll::class, []); $this->assertEquals($expected, $result); } @@ -458,7 +458,7 @@ public function it_should_format_not_found_class_by_helper() { $this->expectException(\Yish\Generators\Exceptions\ClassNotFoundException::class); - format(request(), ABCD::class, []); + formatter(request(), ABCD::class, []); } /** @@ -469,7 +469,7 @@ public function if_status_not_bool_got_exception() { $this->expectException(\Yish\Generators\Exceptions\InvalidArgumentException::class); - format(request(), ErrorStatus::class, []); + formatter(request(), ErrorStatus::class, []); } /** @@ -490,7 +490,7 @@ public function if_status_no_given_will_be_false() 'errors' => [], ]; - $result = format(request(), NoGivenStatus::class, []); + $result = formatter(request(), NoGivenStatus::class, []); $this->assertEquals($expected, $result); } diff --git a/tests/TransformerTest.php b/tests/TransformerTest.php index 9b2d45e..fec0cbf 100644 --- a/tests/TransformerTest.php +++ b/tests/TransformerTest.php @@ -30,7 +30,7 @@ public function it_should_transform_by_helper() { $expected = ['name' => 'yish']; - $result = transform(UserTransformer::class, [ + $result = transformer(UserTransformer::class, [ 'name' => 'yish', 'age' => 28 ]); @@ -46,6 +46,6 @@ public function it_should_not_found_class_by_helper() { $this->expectException(\Yish\Generators\Exceptions\ClassNotFoundException::class); - transform(ABCD::class, []); + transformer(ABCD::class, []); } } \ No newline at end of file