@@ -144,7 +144,7 @@ public function testAddIgnoresDefaultNamespaceWhenExists(): void
144
144
145
145
public function testAddWorksWithCurrentHTTPMethods (): void
146
146
{
147
- Services::request ()->setMethod ('get ' );
147
+ Services::request ()->setMethod ('GET ' );
148
148
149
149
$ routes = $ this ->getCollector ();
150
150
@@ -176,7 +176,7 @@ public function testAddWithLeadingSlash(): void
176
176
177
177
public function testMatchIgnoresInvalidHTTPMethods (): void
178
178
{
179
- Services::request ()->setMethod ('get ' );
179
+ Services::request ()->setMethod ('GET ' );
180
180
181
181
$ routes = $ this ->getCollector ();
182
182
@@ -189,7 +189,7 @@ public function testMatchIgnoresInvalidHTTPMethods(): void
189
189
190
190
public function testAddWorksWithArrayOFHTTPMethods (): void
191
191
{
192
- Services::request ()->setMethod ('post ' );
192
+ Services::request ()->setMethod ('POST ' );
193
193
194
194
$ routes = $ this ->getCollector ();
195
195
@@ -696,7 +696,7 @@ public function testPresenterScaffoldsCorrectly(): void
696
696
697
697
public function testResourcesWithCustomController (): void
698
698
{
699
- Services::request ()->setMethod ('get ' );
699
+ Services::request ()->setMethod ('GET ' );
700
700
$ routes = $ this ->getCollector ();
701
701
702
702
$ routes ->resource ('photos ' , ['controller ' => '<script>gallery ' ]);
@@ -713,7 +713,7 @@ public function testResourcesWithCustomController(): void
713
713
714
714
public function testResourcesWithCustomPlaceholder (): void
715
715
{
716
- Services::request ()->setMethod ('get ' );
716
+ Services::request ()->setMethod ('GET ' );
717
717
$ routes = $ this ->getCollector ();
718
718
719
719
$ routes ->resource ('photos ' , ['placeholder ' => ':num ' ]);
@@ -730,7 +730,7 @@ public function testResourcesWithCustomPlaceholder(): void
730
730
731
731
public function testResourcesWithDefaultPlaceholder (): void
732
732
{
733
- Services::request ()->setMethod ('get ' );
733
+ Services::request ()->setMethod ('GET ' );
734
734
$ routes = $ this ->getCollector ();
735
735
736
736
$ routes ->setDefaultConstraint ('num ' );
@@ -748,7 +748,7 @@ public function testResourcesWithDefaultPlaceholder(): void
748
748
749
749
public function testResourcesWithBogusDefaultPlaceholder (): void
750
750
{
751
- Services::request ()->setMethod ('get ' );
751
+ Services::request ()->setMethod ('GET ' );
752
752
$ routes = $ this ->getCollector ();
753
753
754
754
$ routes ->setDefaultConstraint (':num ' );
@@ -766,7 +766,7 @@ public function testResourcesWithBogusDefaultPlaceholder(): void
766
766
767
767
public function testResourcesWithOnly (): void
768
768
{
769
- Services::request ()->setMethod ('get ' );
769
+ Services::request ()->setMethod ('GET ' );
770
770
$ routes = $ this ->getCollector ();
771
771
772
772
$ routes ->resource ('photos ' , ['only ' => 'index ' ]);
@@ -780,7 +780,7 @@ public function testResourcesWithOnly(): void
780
780
781
781
public function testResourcesWithExcept (): void
782
782
{
783
- Services::request ()->setMethod ('get ' );
783
+ Services::request ()->setMethod ('GET ' );
784
784
$ routes = $ this ->getCollector ();
785
785
786
786
$ routes ->resource ('photos ' , ['except ' => 'edit,new ' ]);
@@ -811,23 +811,23 @@ public function testResourcesWithWebsafe(): void
811
811
812
812
public function testMatchSupportsMultipleMethods (): void
813
813
{
814
- Services::request ()->setMethod ('get ' );
814
+ Services::request ()->setMethod ('GET ' );
815
815
$ routes = $ this ->getCollector ();
816
816
817
817
$ expected = ['here ' => '\there ' ];
818
818
819
819
$ routes ->match (['GET ' , 'POST ' ], 'here ' , 'there ' );
820
820
$ this ->assertSame ($ expected , $ routes ->getRoutes ());
821
821
822
- Services::request ()->setMethod ('post ' );
822
+ Services::request ()->setMethod ('POST ' );
823
823
$ routes = $ this ->getCollector ();
824
824
$ routes ->match (['GET ' , 'POST ' ], 'here ' , 'there ' );
825
825
$ this ->assertSame ($ expected , $ routes ->getRoutes ());
826
826
}
827
827
828
828
public function testGet (): void
829
829
{
830
- Services::request ()->setMethod ('get ' );
830
+ Services::request ()->setMethod ('GET ' );
831
831
$ routes = $ this ->getCollector ();
832
832
833
833
$ expected = ['here ' => '\there ' ];
@@ -949,7 +949,7 @@ public function testEnvironmentRestricts(): void
949
949
{
950
950
// ENVIRONMENT should be 'testing'
951
951
952
- Services::request ()->setMethod ('get ' );
952
+ Services::request ()->setMethod ('GET ' );
953
953
$ routes = $ this ->getCollector ();
954
954
955
955
$ expected = ['here ' => '\there ' ];
@@ -1434,7 +1434,7 @@ static function (): void {},
1434
1434
1435
1435
public function testRouteGroupWithFilterSimple (): void
1436
1436
{
1437
- Services::request ()->setMethod ('get ' );
1437
+ Services::request ()->setMethod ('GET ' );
1438
1438
$ routes = $ this ->getCollector ();
1439
1439
1440
1440
$ routes ->group (
@@ -1453,7 +1453,7 @@ static function ($routes): void {
1453
1453
1454
1454
public function testRouteGroupWithFilterWithParams (): void
1455
1455
{
1456
- Services::request ()->setMethod ('get ' );
1456
+ Services::request ()->setMethod ('GET ' );
1457
1457
$ routes = $ this ->getCollector ();
1458
1458
1459
1459
$ routes ->group (
@@ -1471,15 +1471,15 @@ static function ($routes): void {
1471
1471
1472
1472
public function test404OverrideNot (): void
1473
1473
{
1474
- Services::request ()->setMethod ('get ' );
1474
+ Services::request ()->setMethod ('GET ' );
1475
1475
$ routes = $ this ->getCollector ();
1476
1476
1477
1477
$ this ->assertNull ($ routes ->get404Override ());
1478
1478
}
1479
1479
1480
1480
public function test404OverrideString (): void
1481
1481
{
1482
- Services::request ()->setMethod ('get ' );
1482
+ Services::request ()->setMethod ('GET ' );
1483
1483
$ routes = $ this ->getCollector ();
1484
1484
1485
1485
$ routes ->set404Override ('Explode ' );
@@ -1488,7 +1488,7 @@ public function test404OverrideString(): void
1488
1488
1489
1489
public function test404OverrideCallable (): void
1490
1490
{
1491
- Services::request ()->setMethod ('get ' );
1491
+ Services::request ()->setMethod ('GET ' );
1492
1492
$ routes = $ this ->getCollector ();
1493
1493
1494
1494
$ routes ->set404Override (static function (): void {
@@ -1499,7 +1499,7 @@ public function test404OverrideCallable(): void
1499
1499
1500
1500
public function testOffsetParameters (): void
1501
1501
{
1502
- Services::request ()->setMethod ('get ' );
1502
+ Services::request ()->setMethod ('GET ' );
1503
1503
$ routes = $ this ->getCollector ();
1504
1504
1505
1505
$ routes ->get ('users/(:num) ' , 'users/show/$1 ' , ['offset ' => 1 ]);
@@ -1515,7 +1515,7 @@ public function testOffsetParameters(): void
1515
1515
public function testRouteToWithSubdomainMatch (): void
1516
1516
{
1517
1517
$ _SERVER ['HTTP_HOST ' ] = 'doc.example.com ' ;
1518
- Services::request ()->setMethod ('get ' );
1518
+ Services::request ()->setMethod ('GET ' );
1519
1519
1520
1520
$ routes = $ this ->getCollector ();
1521
1521
@@ -1527,7 +1527,7 @@ public function testRouteToWithSubdomainMatch(): void
1527
1527
public function testRouteToWithSubdomainMismatch (): void
1528
1528
{
1529
1529
$ _SERVER ['HTTP_HOST ' ] = 'dev.example.com ' ;
1530
- Services::request ()->setMethod ('get ' );
1530
+ Services::request ()->setMethod ('GET ' );
1531
1531
1532
1532
$ routes = $ this ->getCollector ();
1533
1533
@@ -1539,7 +1539,7 @@ public function testRouteToWithSubdomainMismatch(): void
1539
1539
public function testRouteToWithSubdomainNot (): void
1540
1540
{
1541
1541
$ _SERVER ['HTTP_HOST ' ] = 'example.com ' ;
1542
- Services::request ()->setMethod ('get ' );
1542
+ Services::request ()->setMethod ('GET ' );
1543
1543
1544
1544
$ routes = $ this ->getCollector ();
1545
1545
@@ -1551,7 +1551,7 @@ public function testRouteToWithSubdomainNot(): void
1551
1551
public function testRouteToWithGenericSubdomainMatch (): void
1552
1552
{
1553
1553
$ _SERVER ['HTTP_HOST ' ] = 'doc.example.com ' ;
1554
- Services::request ()->setMethod ('get ' );
1554
+ Services::request ()->setMethod ('GET ' );
1555
1555
1556
1556
$ routes = $ this ->getCollector ();
1557
1557
@@ -1563,7 +1563,7 @@ public function testRouteToWithGenericSubdomainMatch(): void
1563
1563
public function testRouteToWithGenericSubdomainMismatch (): void
1564
1564
{
1565
1565
$ _SERVER ['HTTP_HOST ' ] = 'dev.example.com ' ;
1566
- Services::request ()->setMethod ('get ' );
1566
+ Services::request ()->setMethod ('GET ' );
1567
1567
1568
1568
$ routes = $ this ->getCollector ();
1569
1569
@@ -1575,7 +1575,7 @@ public function testRouteToWithGenericSubdomainMismatch(): void
1575
1575
public function testRouteToWithGenericSubdomainNot (): void
1576
1576
{
1577
1577
$ _SERVER ['HTTP_HOST ' ] = 'example.com ' ;
1578
- Services::request ()->setMethod ('get ' );
1578
+ Services::request ()->setMethod ('GET ' );
1579
1579
1580
1580
$ routes = $ this ->getCollector ();
1581
1581
@@ -1587,7 +1587,7 @@ public function testRouteToWithGenericSubdomainNot(): void
1587
1587
public function testRouteToWithoutSubdomainMatch (): void
1588
1588
{
1589
1589
$ _SERVER ['HTTP_HOST ' ] = 'doc.example.com ' ;
1590
- Services::request ()->setMethod ('get ' );
1590
+ Services::request ()->setMethod ('GET ' );
1591
1591
1592
1592
$ routes = $ this ->getCollector ();
1593
1593
@@ -1599,7 +1599,7 @@ public function testRouteToWithoutSubdomainMatch(): void
1599
1599
public function testRouteToWithoutSubdomainMismatch (): void
1600
1600
{
1601
1601
$ _SERVER ['HTTP_HOST ' ] = 'dev.example.com ' ;
1602
- Services::request ()->setMethod ('get ' );
1602
+ Services::request ()->setMethod ('GET ' );
1603
1603
1604
1604
$ routes = $ this ->getCollector ();
1605
1605
@@ -1611,7 +1611,7 @@ public function testRouteToWithoutSubdomainMismatch(): void
1611
1611
public function testRouteToWithoutSubdomainNot (): void
1612
1612
{
1613
1613
$ _SERVER ['HTTP_HOST ' ] = 'example.com ' ;
1614
- Services::request ()->setMethod ('get ' );
1614
+ Services::request ()->setMethod ('GET ' );
1615
1615
1616
1616
$ routes = $ this ->getCollector ();
1617
1617
@@ -1628,7 +1628,7 @@ public function testRouteToWithoutSubdomainNot(): void
1628
1628
public function testRouteOverwritingDifferentSubdomains (): void
1629
1629
{
1630
1630
$ _SERVER ['HTTP_HOST ' ] = 'doc.domain.com ' ;
1631
- Services::request ()->setMethod ('get ' );
1631
+ Services::request ()->setMethod ('GET ' );
1632
1632
1633
1633
$ routes = $ this ->getCollector ();
1634
1634
$ router = new Router ($ routes , Services::request ());
@@ -1649,7 +1649,7 @@ public function testRouteOverwritingDifferentSubdomains(): void
1649
1649
public function testRouteOverwritingTwoRules (): void
1650
1650
{
1651
1651
$ _SERVER ['HTTP_HOST ' ] = 'doc.domain.com ' ;
1652
- Services::request ()->setMethod ('get ' );
1652
+ Services::request ()->setMethod ('GET ' );
1653
1653
1654
1654
$ routes = $ this ->getCollector ();
1655
1655
$ router = new Router ($ routes , Services::request ());
@@ -1670,7 +1670,7 @@ public function testRouteOverwritingTwoRules(): void
1670
1670
public function testRouteOverwritingTwoRulesLastApplies (): void
1671
1671
{
1672
1672
$ _SERVER ['HTTP_HOST ' ] = 'doc.domain.com ' ;
1673
- Services::request ()->setMethod ('get ' );
1673
+ Services::request ()->setMethod ('GET ' );
1674
1674
1675
1675
$ routes = $ this ->getCollector ();
1676
1676
$ router = new Router ($ routes , Services::request ());
@@ -1690,7 +1690,7 @@ public function testRouteOverwritingTwoRulesLastApplies(): void
1690
1690
public function testRouteOverwritingMatchingSubdomain (): void
1691
1691
{
1692
1692
$ _SERVER ['HTTP_HOST ' ] = 'doc.domain.com ' ;
1693
- Services::request ()->setMethod ('get ' );
1693
+ Services::request ()->setMethod ('GET ' );
1694
1694
1695
1695
$ routes = $ this ->getCollector ();
1696
1696
$ router = new Router ($ routes , Services::request ());
@@ -1710,7 +1710,7 @@ public function testRouteOverwritingMatchingSubdomain(): void
1710
1710
public function testRouteOverwritingMatchingHost (): void
1711
1711
{
1712
1712
$ _SERVER ['HTTP_HOST ' ] = 'doc.domain.com ' ;
1713
- Services::request ()->setMethod ('get ' );
1713
+ Services::request ()->setMethod ('GET ' );
1714
1714
1715
1715
$ routes = $ this ->getCollector ();
1716
1716
$ router = new Router ($ routes , Services::request ());
@@ -1734,7 +1734,7 @@ public function testRouteOverwritingMatchingHost(): void
1734
1734
*/
1735
1735
public function testRouteDefaultNameSpace (): void
1736
1736
{
1737
- Services::request ()->setMethod ('get ' );
1737
+ Services::request ()->setMethod ('GET ' );
1738
1738
$ routes = $ this ->getCollector ();
1739
1739
$ router = new Router ($ routes , Services::request ());
1740
1740
@@ -1748,7 +1748,7 @@ public function testRouteDefaultNameSpace(): void
1748
1748
1749
1749
public function testZeroAsURIPath (): void
1750
1750
{
1751
- Services::request ()->setMethod ('get ' );
1751
+ Services::request ()->setMethod ('GET ' );
1752
1752
$ routes = $ this ->getCollector ();
1753
1753
$ router = new Router ($ routes , Services::request ());
1754
1754
@@ -1796,7 +1796,7 @@ public function testAutoRoutesControllerNameReturnsFQCN($namespace): void
1796
1796
*/
1797
1797
public function testRoutesControllerNameReturnsFQCN ($ namespace ): void
1798
1798
{
1799
- Services::request ()->setMethod ('get ' );
1799
+ Services::request ()->setMethod ('GET ' );
1800
1800
$ routes = $ this ->getCollector ();
1801
1801
$ routes ->setAutoRoute (false );
1802
1802
$ routes ->setDefaultNamespace ($ namespace );
0 commit comments