From 8a000d39216d61af1d85e7df0b57153d90859f0f Mon Sep 17 00:00:00 2001 From: Veselov Pavel Date: Fri, 23 Aug 2019 16:54:30 +0300 Subject: [PATCH] fix coverage --- src/Helpers/ColumnAssertions.php | 1 + tests.sh | 2 +- tests/Functional/Schema/CreateIndexTest.php | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Helpers/ColumnAssertions.php b/src/Helpers/ColumnAssertions.php index 7c68a01..c770328 100644 --- a/src/Helpers/ColumnAssertions.php +++ b/src/Helpers/ColumnAssertions.php @@ -10,6 +10,7 @@ /** * @mixin TestCase + * @codeCoverageIgnore */ trait ColumnAssertions { diff --git a/tests.sh b/tests.sh index c4ce18c..2e9f0a0 100755 --- a/tests.sh +++ b/tests.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -psql postgres -U user -tc "SELECT 1 FROM pg_database WHERE datname = 'testing'" | grep -q 1 || psql postgres -U user -c "CREATE DATABASE testing" +psql postgres -U postgres -tc "SELECT 1 FROM pg_database WHERE datname = 'testing'" | grep -q 1 || psql postgres -U postgres -c "CREATE DATABASE testing" composer lint php -d pcov.directory='.' vendor/bin/phpunit --coverage-html build diff --git a/tests/Functional/Schema/CreateIndexTest.php b/tests/Functional/Schema/CreateIndexTest.php index e0b2138..b36fffb 100644 --- a/tests/Functional/Schema/CreateIndexTest.php +++ b/tests/Functional/Schema/CreateIndexTest.php @@ -41,6 +41,11 @@ public function createIndexIfNotExists(): void }); $this->seeIndex('test_table_name_unique'); + + $this->assertSameIndex( + 'test_table_name_unique', + 'CREATE UNIQUE INDEX test_table_name_unique ON public.test_table USING btree (name)' + ); } /**