From ed163a66fd56ce82efb2c04eba8cde0c4dc7412a Mon Sep 17 00:00:00 2001 From: AndreaChirulescu Date: Fri, 23 Apr 2021 21:38:53 +0200 Subject: Added an uppercase in sql for venue and concert duplicate check Added test to create duplicate concert with varied cases in string --- tests/ConcertTest.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests') diff --git a/tests/ConcertTest.php b/tests/ConcertTest.php index 82bdc9a..6d14b68 100644 --- a/tests/ConcertTest.php +++ b/tests/ConcertTest.php @@ -46,4 +46,26 @@ final class ConcertTest extends WP_UnitTestCase $this->assertNull($new); } + + public function testCreateExistingConcertVariableCase() : void + { + $venue = GiglogAdmin_Venue::create("a venue"); + $today = date("Y-m-d"); + + GiglogAdmin_Concert::create( + "a concert123", + $venue->id(), + $today, + "https://example.com/tickets/42", + "https://example.com/events/93"); + + $new = GiglogAdmin_Concert::create( + "a CoNceRt123", + $venue->id(), + $today, + "https://example.com/tickets/42", + "https://example.com/events/93"); + + $this->assertNull($new); + } } -- cgit v1.2.3