Skip to content

Commit

Permalink
Merge branch '4.0' into 4
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Mar 21, 2021
2 parents efdd90b + 5145566 commit fc93151
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 101 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
version: ~> 1.0

import:
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-fixed.yml

env:
global:
- COMPOSER_ROOT_VERSION="1.x-dev"
- REQUIRE_RECIPE="4.x-dev"
- PHPUNIT_TEST=1
- silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-range.yml
61 changes: 0 additions & 61 deletions build.php

This file was deleted.

7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"require": {
"php": ">=5.6",
"sminnee/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3",
"behat/behat": "^3.2",
"behat/mink": "^1.7",
"behat/mink-extension": "^2.1",
Expand All @@ -34,11 +35,7 @@
},
"autoload": {
"psr-4": {
"SilverStripe\\BehatExtension\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"SilverStripe\\BehatExtension\\": "src/",
"SilverStripe\\BehatExtension\\Tests\\": "tests/php/"
}
},
Expand Down
19 changes: 0 additions & 19 deletions init.php

This file was deleted.

17 changes: 17 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="SilverStripe">
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>

<file>src</file>
<file>tests</file>

<!-- base rules are PSR-2 -->
<rule ref="PSR2" >
<!-- Current exclusions -->
<exclude name="PSR1.Methods.CamelCapsMethodName" />
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
<exclude name="Generic.Files.LineLength.TooLong" />
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
</rule>
</ruleset>
2 changes: 1 addition & 1 deletion src/Context/SilverStripeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ abstract class SilverStripeContext extends MinkContext implements SilverStripeAw
*/
public function __construct(array $parameters = null)
{
if (!preg_match('/\\\FeatureContext$/', get_class($this))) {
if (!preg_match('#[\\\]FeatureContext$#', get_class($this))) {
throw new InvalidArgumentException(
'Subclasses of SilverStripeContext must be named FeatureContext. Found "' . get_class($this) . '""'
);
Expand Down
9 changes: 1 addition & 8 deletions tests/php/SilverStripeContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,11 @@
use SilverStripe\BehatExtension\Tests\SilverStripeContextTest\FeatureContext;
use SilverStripe\Dev\SapphireTest;

class SilverStripeContextTest extends \PHPUnit_Framework_TestCase
class SilverStripeContextTest extends SapphireTest
{

protected $backupGlobals = false;

public static function setUpBeforeClass()
{
// Bootstrap test environment
parent::setUpBeforeClass();
SapphireTest::start();
}

/**
* @expectedException \LogicException
* @expectedExceptionMessage Cannot find 'region_map' in the behat.yml
Expand Down

0 comments on commit fc93151

Please sign in to comment.