File tree Expand file tree Collapse file tree 8 files changed +109
-13
lines changed
Expand file tree Collapse file tree 8 files changed +109
-13
lines changed Original file line number Diff line number Diff line change 1+ name : Atlas.Statement CI
2+
3+ on :
4+ push :
5+ paths-ignore :
6+ - ' **.md'
7+ - ' **.txt'
8+ pull_request :
9+ paths-ignore :
10+ - ' **.md'
11+ - ' **.txt'
12+ workflow_dispatch :
13+
14+ env :
15+ fail-fast : true
16+
17+ # PHP extensions required by Composer
18+ EXTENSIONS : pdo
19+
20+ permissions :
21+ contents : read
22+
23+ jobs :
24+
25+ # # PHPStan
26+ # quality:
27+ # name: "Validate Quality"
28+ # if: "!contains(github.event.head_commit.message, 'ci skip')"
29+ #
30+ # permissions:
31+ # contents: read
32+ #
33+ # runs-on: ubuntu-22.04
34+ #
35+ # strategy:
36+ # fail-fast: true
37+ # matrix:
38+ # php:
39+ # - '8.0'
40+ # - '8.1'
41+ # - '8.2'
42+ # - '8.3'
43+ # - '8.4'
44+ # steps:
45+ # - uses: actions/checkout@v4
46+ #
47+ # - name: "Setup PHP"
48+ # uses: shivammathur/setup-php@2.35.3
49+ # with:
50+ # php-version: ${{ matrix.php }}
51+ # extensions: ${{ env.EXTENSIONS }}
52+ # env:
53+ # COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+ #
55+ # - name: "Install development dependencies with Composer"
56+ # uses: "ramsey/composer-install@v3"
57+ # with:
58+ # composer-options: "--prefer-dist"
59+ #
60+ # - name: "PHPStan"
61+ # run: |
62+ # composer stan
63+
64+ unit-tests :
65+ # needs: quality
66+
67+ permissions :
68+ contents : read # to fetch code (actions/checkout)
69+
70+ name : Unit tests / PHP-${{ matrix.php }}
71+ runs-on : ubuntu-22.04
72+
73+ strategy :
74+ matrix :
75+ php :
76+ - ' 8.0'
77+ - ' 8.1'
78+ - ' 8.2'
79+ - ' 8.3'
80+ - ' 8.4'
81+ steps :
82+ - uses : actions/checkout@v4
83+
84+ - name : " Setup PHP"
85+ uses : shivammathur/setup-php@2.35.3
86+ with :
87+ php-version : ${{ matrix.php }}
88+ extensions : ${{ env.EXTENSIONS }}
89+ env :
90+ COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91+
92+ - name : " Install development dependencies with Composer"
93+ uses : " ramsey/composer-install@v3"
94+ with :
95+ composer-options : " --prefer-dist"
96+
97+ - name : " Run Unit Tests"
98+ if : always()
99+ run : |
100+ composer test
Original file line number Diff line number Diff line change 11/composer.lock
22/vendor
33/.phpunit.result.cache
4+ .bash_history
5+ .composer
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1010
1111use PDO ;
1212
13- class DeleteTest extends StatementTest
13+ class DeleteTest extends StatementTestCase
1414{
1515 public function testCommon ()
1616 {
Original file line number Diff line number Diff line change 1010
1111use PDO ;
1212
13- class InsertTest extends StatementTest
13+ class InsertTest extends StatementTestCase
1414{
1515 public function testCommon ()
1616 {
Original file line number Diff line number Diff line change 1111use PDO ;
1212use Atlas \Statement \Driver \FakeDriver ;
1313
14- class SelectTest extends StatementTest
14+ class SelectTest extends StatementTestCase
1515{
1616 public function testDistinct ()
1717 {
Original file line number Diff line number Diff line change 99namespace Atlas \Statement ;
1010
1111use PDO ;
12+ use PHPUnit \Framework \TestCase ;
1213use ReflectionClass ;
1314use Atlas \Statement \Driver \FakeDriver ;
1415
15- abstract class StatementTest extends \ PHPUnit \ Framework \ TestCase
16+ abstract class StatementTestCase extends TestCase
1617{
1718 protected $ statement ;
1819
@@ -23,7 +24,7 @@ protected function setUp() : void
2324 $ rc = new ReflectionClass (Bind::CLASS );
2425 $ rp = $ rc ->getProperty ('instanceCount ' );
2526 $ rp ->setAccessible (true );
26- $ rp ->setValue (0 );
27+ $ rp ->setValue (null , 0 );
2728
2829 $ this ->statement = $ this ->newStatement ();
2930 }
Original file line number Diff line number Diff line change 1010
1111use PDO ;
1212
13- class UpdateTest extends StatementTest
13+ class UpdateTest extends StatementTestCase
1414{
1515 public function testCommon ()
1616 {
You can’t perform that action at this time.
0 commit comments