From 19a61462a2328dc48569c1a20e5b5e57eb9331bc Mon Sep 17 00:00:00 2001 From: Tom Broucke Date: Wed, 11 Dec 2024 09:58:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20fix:=20renamed=20methods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/DatePickerTest.php | 6 +++--- tests/FieldTest.php | 6 +++--- tests/FileTest.php | 10 +++++----- tests/GalleryTest.php | 2 +- tests/GoogleMapTest.php | 24 ++++++++++++------------ tests/ImageTest.php | 6 +++--- tests/LinkTest.php | 12 ++++++------ tests/RepeaterTest.php | 2 +- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/DatePickerTest.php b/tests/DatePickerTest.php index f0a1fcd..68b64c3 100644 --- a/tests/DatePickerTest.php +++ b/tests/DatePickerTest.php @@ -41,7 +41,7 @@ protected function setUp(): void $this->datePicker = DatePicker::createFromFormat('d/m/Y', '29/10/2022'); } - public function testCanBeCreated(): void + public function test_can_be_created(): void { $this->assertInstanceOf( DatePicker::class, @@ -49,7 +49,7 @@ public function testCanBeCreated(): void ); } - public function testDateCanBeFormatted(): void + public function test_date_can_be_formatted(): void { $this->assertEquals( '2022-10-29', @@ -57,7 +57,7 @@ public function testDateCanBeFormatted(): void ); } - public function testTimeStampsCanBeReturned(): void + public function test_time_stamps_can_be_returned(): void { $this->assertIsInt( $this->datePicker->getTimestamp() diff --git a/tests/FieldTest.php b/tests/FieldTest.php index 3fcf9a0..eea2f40 100644 --- a/tests/FieldTest.php +++ b/tests/FieldTest.php @@ -29,18 +29,18 @@ protected function setUp(): void $this->emptyField = new Field(false, 0, []); } - public function testValue() + public function test_value() { $this->assertEquals((string) $this->field, $this->value['url']); } - public function testValueIsCorrect() + public function test_value_is_correct() { $this->assertTrue($this->field->isSet()); $this->assertFalse($this->emptyField->isSet()); } - public function testDefaultReturnsObject() + public function test_default_returns_object() { $this->assertIsObject($this->field->default(['title' => 'Title', 'url' => 'https://example.com'])); } diff --git a/tests/FileTest.php b/tests/FileTest.php index 5d9ae71..8728d5f 100644 --- a/tests/FileTest.php +++ b/tests/FileTest.php @@ -62,31 +62,31 @@ protected function setUp(): void $this->emptyFile = new File([], null, []); } - public function testUrl() + public function test_url() { $this->assertEquals('https://example.com/imagetitle-scaled.jpg', $this->file->url()); $this->assertNull($this->emptyFile->url()); } - public function testTitle() + public function test_title() { $this->assertEquals('imagetitle', $this->file->title()); $this->assertNull($this->emptyFile->title()); } - public function testMimeType() + public function test_mime_type() { $this->assertEquals('image/jpeg', $this->file->mimeType()); $this->assertNull($this->emptyFile->mimeType()); } - public function testWidth() + public function test_width() { $this->assertEquals(2560, $this->file->width()); $this->assertNull($this->emptyFile->width()); } - public function testHeight() + public function test_height() { $this->assertEquals(638, $this->file->height()); $this->assertNull($this->emptyFile->height()); diff --git a/tests/GalleryTest.php b/tests/GalleryTest.php index 53014d6..58fcb42 100644 --- a/tests/GalleryTest.php +++ b/tests/GalleryTest.php @@ -62,7 +62,7 @@ protected function setUp(): void $this->gallery = new Gallery($this->galleryArray, null, []); } - public function testGalleryHasTwoImages() + public function test_gallery_has_two_images() { $this->assertEquals(1, count($this->gallery)); } diff --git a/tests/GoogleMapTest.php b/tests/GoogleMapTest.php index 0f09573..e1d58f9 100644 --- a/tests/GoogleMapTest.php +++ b/tests/GoogleMapTest.php @@ -32,84 +32,84 @@ protected function setUp(): void $this->emptyGoogleMap = new GoogleMap([], null, []); } - public function testAddress() + public function test_address() { $this->assertEquals('Em. Zolastraat, Menen, Belgium', $this->googleMap->address()); $this->assertNull($this->emptyGoogleMap->address()); $this->assertEquals('Em. Zolastraat, Menen, Belgium', $this->emptyGoogleMap->default(['address' => 'Em. Zolastraat, Menen, Belgium'])->address()); } - public function testLat() + public function test_lat() { $this->assertEquals(50.80698, $this->googleMap->lat()); $this->assertNull($this->emptyGoogleMap->lat()); $this->assertEquals(50.80698, $this->googleMap->default(['lat' => 50.80698])->lat()); } - public function testLng() + public function test_lng() { $this->assertEquals(3.1082768, $this->googleMap->lng()); $this->assertNull($this->emptyGoogleMap->lng()); $this->assertEquals(3.1082768, $this->googleMap->default(['lng' => 3.1082768])->lng()); } - public function testZoom() + public function test_zoom() { $this->assertEquals(14, $this->googleMap->zoom()); $this->assertNull($this->emptyGoogleMap->zoom()); $this->assertEquals(14, $this->googleMap->default(['zoom' => 14])->zoom()); } - public function testName() + public function test_name() { $this->assertEquals('Em. Zolastraat', $this->googleMap->name()); $this->assertNull($this->emptyGoogleMap->name()); $this->assertEquals('Em. Zolastraat', $this->googleMap->default(['name' => 'Em. Zolastraat'])->name()); } - public function testStreetName() + public function test_street_name() { $this->assertEquals('Em. Zolastraat', $this->googleMap->StreetName()); $this->assertNull($this->emptyGoogleMap->StreetName()); $this->assertEquals('Em. Zolastraat', $this->googleMap->default(['StreetName' => 'Em. Zolastraat'])->StreetName()); } - public function testCity() + public function test_city() { $this->assertEquals('Menen', $this->googleMap->city()); $this->assertNull($this->emptyGoogleMap->city()); $this->assertEquals('Menen', $this->googleMap->default(['city' => 'Menen'])->city()); } - public function testState() + public function test_state() { $this->assertEquals('Vlaams Gewest', $this->googleMap->state()); $this->assertNull($this->emptyGoogleMap->state()); $this->assertEquals('Vlaams Gewest', $this->googleMap->default(['state' => 'Vlaams Gewest'])->state()); } - public function testStateShort() + public function test_state_short() { $this->assertEquals('WV', $this->googleMap->stateShort()); $this->assertNull($this->emptyGoogleMap->stateShort()); $this->assertEquals('WV', $this->googleMap->default(['stateShort' => 'WV'])->stateShort()); } - public function testPostCode() + public function test_post_code() { $this->assertEquals('8930', $this->googleMap->postCode()); $this->assertNull($this->emptyGoogleMap->postCode()); $this->assertEquals('8930', $this->googleMap->default(['postcode' => '8930'])->postCode()); } - public function testCountry() + public function test_country() { $this->assertEquals('Belgium', $this->googleMap->country()); $this->assertNull($this->emptyGoogleMap->country()); $this->assertEquals('Belgium', $this->googleMap->default(['country' => 'Belgium'])->country()); } - public function testCountryShort() + public function test_country_short() { $this->assertEquals('BE', $this->googleMap->countryShort()); $this->assertNull($this->emptyGoogleMap->countryShort()); diff --git a/tests/ImageTest.php b/tests/ImageTest.php index 06c6884..b3a957b 100644 --- a/tests/ImageTest.php +++ b/tests/ImageTest.php @@ -92,7 +92,7 @@ protected function setUp(): void $this->emptyImage = new Image(false, null, []); } - public function testUrlIsCorrect() + public function test_url_is_correct() { $this->assertEquals($this->image->url('medium'), 'https://example.com/imagetitle-300x75.jpg'); $this->assertEquals($this->imageFromUrl->url('medium'), 'https://example.com/image.jpg'); @@ -101,12 +101,12 @@ public function testUrlIsCorrect() $this->assertEquals($this->emptyImage->default('https://example.com/image.jpg')->url('medium'), 'https://example.com/image.jpg'); } - public function testImageAltIsCorrect() + public function test_image_alt_is_correct() { $this->assertEquals($this->image->alt(), 'Image Title'); } - public function testToStringIsCorrect() + public function test_to_string_is_correct() { $this->assertEquals((string) $this->image, 'https://example.com/imagetitle-150x150.jpg'); $this->assertEquals($this->emptyImage, ''); diff --git a/tests/LinkTest.php b/tests/LinkTest.php index 26c112e..eaa5302 100644 --- a/tests/LinkTest.php +++ b/tests/LinkTest.php @@ -31,37 +31,37 @@ protected function setUp(): void $linkArray = $this->linkArray; } - public function testUrlIsCorrect() + public function test_url_is_correct() { $this->assertIsString($this->link->url()); $this->assertEquals($this->link->url(), $this->linkArray['url']); $this->assertNull($this->emptyLink->url()); } - public function testTitleIsCorrect() + public function test_title_is_correct() { $this->assertIsString($this->link->title()); $this->assertEquals($this->link->title(), $this->linkArray['title']); $this->assertNull($this->emptyLink->title()); } - public function testTargetReturnTypeIsCorrect() + public function test_target_return_type_is_correct() { $this->assertIsString($this->link->target()); $this->assertNull($this->emptyLink->target()); } - public function testTargetIsCorrect() + public function test_target_is_correct() { $this->assertEquals($this->link->target(), $this->linkArray['target']); } - public function testLinkisCorrect() + public function test_linkis_correct() { $this->assertEquals($this->emptyLink->title(), ''); } - public function testToStringIsCorrect() + public function test_to_string_is_correct() { $this->assertEquals($this->link, $this->linkArray['url']); $this->assertEquals($this->emptyLink, ''); diff --git a/tests/RepeaterTest.php b/tests/RepeaterTest.php index ad1a1ef..d4366c2 100644 --- a/tests/RepeaterTest.php +++ b/tests/RepeaterTest.php @@ -19,7 +19,7 @@ protected function setUp(): void $this->repeater = new Repeater($this->repeaterArray, null, []); } - public function testRepeaterHasTwoRows() + public function test_repeater_has_two_rows() { $this->assertEquals(3, count($this->repeater)); }