Skip to content

Commit

Permalink
Merge pull request #11 from pixelfusion/feature/jsonapi-behat-plugin-…
Browse files Browse the repository at this point in the history
…fixes

Feature/jsonapi behat plugin fixes
  • Loading branch information
kielabokkie committed May 10, 2017
2 parents 0c0cd0f + d5199ae commit d75a83d
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 13 deletions.
7 changes: 4 additions & 3 deletions src/Skeletor/Console/CreateProjectCommand.php
@@ -1,13 +1,14 @@
<?php
namespace Skeletor\Console;

use Skeletor\Frameworks\Framework;
use Symfony\Component\Process\Process;
use Skeletor\Exceptions\FailedFilesystem;
use Symfony\Component\Console\Input\InputOption;
use Skeletor\Frameworks\Framework;
use Skeletor\Packages\ConfigurablePackageInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Process;

class CreateProjectCommand extends SkeletorCommand
{
Expand Down
12 changes: 5 additions & 7 deletions src/Skeletor/Frameworks/Laravel54Framework.php
Expand Up @@ -15,14 +15,12 @@ public function setup()

public function configure()
{
$this->projectFilesystem->put('PixelFusion.txt', '©PIXELFUSION');
$this->projectFilesystem->delete('server.php');
$this->projectFilesystem->deleteDir('resources/assets');
$this->projectFilesystem->createDir('setup/git-hooks');

$this->mountManager->copy(
'skeletor://'.$this->options['templatePath'].'/JsonBehatExtensionPackage/FeatureContext.php',
'project://app/namespace/pixelfusion/bootstrap/FeatureContext.php'
);
// $this->mountManager->copy(
// 'skeletor://'.$this->options['templatePath'].'/JsonBehatExtensionPackage/FeatureContext.php',
// 'project://app/namespace/pixelfusion/bootstrap/FeatureContext.php'
// );
}
}
}
13 changes: 10 additions & 3 deletions src/Skeletor/Packages/KielabokkieJsonapiBehatExtensionPackage.php
Expand Up @@ -13,10 +13,17 @@ public function setup()

public function configure(Framework $activeFramework)
{
$this->projectFilesystem->put('PixelFusion.txt', '©PIXELFUSION');
$this->mountManager->copy(
'skeletor://'.$this->options['templatePath'].'/JsonBehatExtensionPackage/FeatureContext.php',
'project://'.$activeFramework->getPath('tests').'/functional/features/bootstrap/FeatureContext.php'
'project://'.$activeFramework->getPath('tests').'/Behat/Feature/bootstrap/FeatureContext.php'
);
$this->mountManager->copy(
'skeletor://'.$this->options['templatePath'].'/JsonBehatExtensionPackage/example.feature',
'project://'.$activeFramework->getPath('tests').'/Behat/Feature/example.feature'
);
$this->mountManager->copy(
'skeletor://'.$this->options['templatePath'].'/JsonBehatExtensionPackage/behat.yml',
'project://behat.yml'
);
}
}
}
22 changes: 22 additions & 0 deletions src/Skeletor/Templates/JsonBehatExtensionPackage/behat.yml
@@ -0,0 +1,22 @@
default:
autoload:
- %paths.base%/tests/Behat/Feature/bootstrap
extensions:
Kielabokkie\BehatJsonApi:
base_url: http://127.0.0.1:8000
# parameters:
# access_token: abcdefg123456789
# oauth:
# uri: /oauth/token
# client_id: 1
# client_secret: testing
# use_bearer_token: true
# password_grant_requires_client_credentials: true
suites:
default:
paths:
- %paths.base%/tests/Behat/Feature
contexts:
- FeatureContext: ~
formatters:
progress: true
@@ -0,0 +1,7 @@
Feature: Example Feature
In order to see if Behat is working correctly
I need to see that I can successfully access the application

Scenario: Check if root domain is accessible
Given I request "GET /"
Then I get a 200 response

0 comments on commit d75a83d

Please sign in to comment.