Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

comments in scenarios fixed

  • Loading branch information...
commit 3b7aaa3ee0adb0d356b15e41a4ec155ef345551e 1 parent 8bab624
@DavertMik DavertMik authored
View
6 autoload.php
@@ -8,8 +8,10 @@
));
$loader->register(true);
-include_once 'vendor/EHER/PHPUnit/src/phpunit/PHPUnit/Autoload.php';
-include_once 'vendor/autoload.php';
+if (stream_resolve_include_path('vendor/autoload.php')) {
+ include_once 'vendor/EHER/PHPUnit/src/phpunit/PHPUnit/Autoload.php';
+ include_once 'vendor/autoload.php';
+}
// hardcode fix to broken goutte. Fuck this composer and friends!
if (!class_exists('Goutte\Client')) {
View
2  composer.json
@@ -15,7 +15,7 @@
"minimum-stability": "dev",
"require":{
"php":">=5.3.2",
- "behat/mink": "1.4@stable",
+ "behat/mink": "*",
"EHER/PHPUnit":">=1.2",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium-driver": "*",
View
58 composer.lock
@@ -1,5 +1,5 @@
{
- "hash": "2f45d9feb9b983170d1c384f2673e04f",
+ "hash": "bb31e1c2f6f412b5b00eaba942ac4e44",
"packages": [
{
"package": "EHER/PHPUnit",
@@ -24,8 +24,8 @@
{
"package": "behat/mink-goutte-driver",
"version": "dev-master",
- "source-reference": "192e58dfd26098385218d65637426c26d148d9b0",
- "commit-date": "1343123643"
+ "source-reference": "703a365a0f6c15f91f35c1cc30531b9de7f23a6d",
+ "commit-date": "1345633817"
},
{
"package": "behat/mink-selenium-driver",
@@ -48,12 +48,6 @@
{
"package": "fabpot/goutte",
"version": "dev-master",
- "alias-pretty-version": "1.0.x-dev",
- "alias-version": "1.0.9999999.9999999-dev"
- },
- {
- "package": "fabpot/goutte",
- "version": "dev-master",
"source-reference": "6d26279344736f6983a969e46afef082ebf30a67",
"commit-date": "1345141401"
},
@@ -72,14 +66,14 @@
{
"package": "instaclick/php-webdriver",
"version": "dev-master",
- "source-reference": "v1.0.5",
- "commit-date": "1343829434"
+ "source-reference": "v1.0.6",
+ "commit-date": "1345642676"
},
{
"package": "monolog/monolog",
"version": "dev-master",
- "source-reference": "1.2.0",
- "commit-date": "1345310833"
+ "source-reference": "75af99d3ceabe08e55f32d395f189fd807648950",
+ "commit-date": "1345916366"
},
{
"package": "symfony/browser-kit",
@@ -90,8 +84,8 @@
{
"package": "symfony/browser-kit",
"version": "dev-master",
- "source-reference": "v2.1.0-RC1",
- "commit-date": "1343564266"
+ "source-reference": "6f2dc48d75ac9027bbea0f8e496f26613ad8b326",
+ "commit-date": "1345643321"
},
{
"package": "symfony/console",
@@ -102,8 +96,8 @@
{
"package": "symfony/console",
"version": "dev-master",
- "source-reference": "3b66f1056f5ac37146d3b755964e8a43a205f2f5",
- "commit-date": "1344349441"
+ "source-reference": "4d463e30faf03f793c7b7184d7482ccdf71e1a05",
+ "commit-date": "1345643321"
},
{
"package": "symfony/css-selector",
@@ -114,8 +108,8 @@
{
"package": "symfony/css-selector",
"version": "dev-master",
- "source-reference": "v2.1.0-RC1",
- "commit-date": "1342347231"
+ "source-reference": "676a7fd9b5027da85b58dd11db5561fef01c6271",
+ "commit-date": "1345643321"
},
{
"package": "symfony/dom-crawler",
@@ -126,8 +120,8 @@
{
"package": "symfony/dom-crawler",
"version": "dev-master",
- "source-reference": "v2.1.0-RC1",
- "commit-date": "1342347231"
+ "source-reference": "f70f7d88441f3d8f8942fe3417c6eb11f9eb79e9",
+ "commit-date": "1345643321"
},
{
"package": "symfony/event-dispatcher",
@@ -138,8 +132,8 @@
{
"package": "symfony/event-dispatcher",
"version": "dev-master",
- "source-reference": "76c76f62702b09e0f182ae618be0f1d79e2a711f",
- "commit-date": "1345066712"
+ "source-reference": "421520fd35ace52106947b2d6c2d9db49cb5a866",
+ "commit-date": "1345643321"
},
{
"package": "symfony/finder",
@@ -150,8 +144,8 @@
{
"package": "symfony/finder",
"version": "dev-master",
- "source-reference": "1af11ab3a686f9c45f2a8d9d721d5717cdd5f1d6",
- "commit-date": "1345026762"
+ "source-reference": "e2e9f746294f60aed3bb5bc20da24e23b92f0479",
+ "commit-date": "1345643321"
},
{
"package": "symfony/process",
@@ -162,8 +156,8 @@
{
"package": "symfony/process",
"version": "dev-master",
- "source-reference": "v2.1.0-RC1",
- "commit-date": "1343512949"
+ "source-reference": "ce83a652ec30e8dc4ef3ddbf722928899630df56",
+ "commit-date": "1345643321"
},
{
"package": "symfony/yaml",
@@ -174,8 +168,8 @@
{
"package": "symfony/yaml",
"version": "dev-master",
- "source-reference": "6b3eb66a7c4495dcaa35a64dd93c8ba8c29f35d8",
- "commit-date": "1344325256"
+ "source-reference": "f18e004fc975707bb4695df1dbbe9b0d8c8b7715",
+ "commit-date": "1345643321"
}
],
"packages-dev": null,
@@ -183,7 +177,7 @@
],
"minimum-stability": "dev",
- "stability-flags": {
- "behat/mink": 0
- }
+ "stability-flags": [
+
+ ]
}
View
BIN  composer.phar
Binary file not shown
View
BIN  package/codecept.phar
Binary file not shown
View
BIN  package/phar/codecept.phar
Binary file not shown
View
11 src/Codeception/AbstractGuy.php
@@ -24,7 +24,6 @@ public function wantToTest($text)
public function wantTo($text)
{
- $this->scenario->comment(array('I want to ' . $text));
if ($this->scenario->running()) {
$this->scenario->runStep();
return $this;
@@ -63,7 +62,7 @@ public function testMethod($signature)
public function expectTo($prediction)
{
- $this->scenario->comment(array('I expect to ' . $prediction));
+ $this->scenario->comment('I expect to ' . $prediction);
if ($this->scenario->running()) {
$this->scenario->runStep();
return $this;
@@ -73,7 +72,7 @@ public function expectTo($prediction)
public function expect($prediction)
{
- $this->scenario->comment(array('I expect ' . $prediction));
+ $this->scenario->comment('I expect ' . $prediction);
if ($this->scenario->running()) {
$this->scenario->runStep();
return $this;
@@ -83,7 +82,7 @@ public function expect($prediction)
public function amGoingTo($argumentation)
{
- $this->scenario->comment(array('I am going to ' . $argumentation));
+ $this->scenario->comment('I am going to ' . $argumentation);
if ($this->scenario->running()) {
$this->scenario->runStep();
return $this;
@@ -92,7 +91,7 @@ public function amGoingTo($argumentation)
}
public function am($role) {
- $this->scenario->comment(array('As a ' . $role));
+ $this->scenario->comment('As a ' . $role);
if ($this->scenario->running()) {
$this->scenario->runStep();
return $this;
@@ -102,7 +101,7 @@ public function am($role) {
public function lookForwardTo($role) {
- $this->scenario->comment(array('So that I ' . $role));
+ $this->scenario->comment('So that I ' . $role);
if ($this->scenario->running()) {
$this->scenario->runStep();
return $this;
View
2  src/Codeception/Codecept.php
@@ -7,7 +7,7 @@
class Codecept
{
- const VERSION = "1.1.1";
+ const VERSION = "1.1.2";
/**
* @var \Codeception\PHPUnit\Runner
View
2  src/Codeception/Scenario.php
@@ -98,7 +98,7 @@ public function getFeature() {
}
public function comment($comment) {
- $this->addStep(new \Codeception\Step\Comment("",$comment));
+ $this->addStep(new \Codeception\Step\Comment($comment,array()));
}
public function getCurrentStep()
View
2  src/Codeception/Subscriber/Console.php
@@ -95,7 +95,7 @@ protected function formattedTestOutput($test, $long)
}
public function beforeComment(\Codeception\Event\Step $e) {
- if ($this->steps) $this->output->writeln("((".$e->getStep()->__toString()."))");
+ if ($this->steps) $this->output->writeln("\n((".$e->getStep()->__toString()."))");
}
public function afterComment(\Codeception\Event\Step $e) {
View
2  tests/data/app/db
@@ -1 +1 @@
-a:1:{s:13:"50342bc02eb6c";a:0:{}}
+a:1:{s:13:"503a7e8c31c42";a:0:{}}
View
18 tests/data/sandbox/codeception.yml
@@ -1,18 +0,0 @@
-paths:
- tests: tests
- log: tests/_log
- data: tests/_data
- helpers: tests/_helpers
-settings:
- bootstrap: _bootstrap.php
- suite_class: \PHPUnit_Framework_TestSuite
- colors: false
- memory_limit: 1024M
- log: true
-modules:
- config:
- Db:
- dsn: ''
- user: ''
- password: ''
- dump: tests/_data/dump.sql
View
42 tests/data/sandbox/tests/_data/DummyClass.php
@@ -1,42 +0,0 @@
-<?php
-
-class DummyClass
-{
- protected $checkMe = 1;
-
- function __construct($checkMe = 1)
- {
- $this->checkMe = "constructed: ".$checkMe;
- }
-
- public function helloWorld() {
- return "hello";
- }
-
- public function goodByeWorld() {
- return "good bye";
- }
-
- protected function notYourBusinessWorld()
- {
- return "goAway";
- }
-
- public function getCheckMe() {
- return $this->checkMe;
- }
-
- public function call() {
- $this->targetMethod();
- return true;
- }
-
- public function targetMethod() {
- return true;
- }
-
- public function exceptionalMethod() {
- throw new Exception('Catch it!');
- }
-
-}
View
1  tests/data/sandbox/tests/_data/dump.sql
@@ -1 +0,0 @@
-/* Replace this file with actual dump of your database */
View
10 tests/data/sandbox/tests/_helpers/DumbHelper.php
@@ -1,10 +0,0 @@
-<?php
-namespace Codeception\Module;
-
-require_once 'PHPUnit/Framework/Assert/Functions.php';
-
-// here you can define custom functions for DumbGuy
-
-class DumbHelper extends \Codeception\Module
-{
-}
View
0  tests/data/sandbox/tests/_log/index
No changes.
View
3  tests/data/sandbox/tests/dummy.suite.yml
@@ -1,3 +0,0 @@
-class_name: DumbGuy
-modules:
- enabled: [Filesystem, DumbHelper]
View
144 tests/data/sandbox/tests/dummy/DumbGuy.php
@@ -1,144 +0,0 @@
-<?php
-// This class was automatically generated by build task
-// You can change it manually, but it will be overwritten on next build
-
-use Codeception\Maybe;
-
-class DumbGuy extends \Codeception\AbstractGuy
-{
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::amInPath()
- */
- public function amInPath($path) {
- $this->scenario->condition('amInPath', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::openFile()
- */
- public function openFile($filename) {
- $this->scenario->action('openFile', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::deleteFile()
- */
- public function deleteFile($filename) {
- $this->scenario->action('deleteFile', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::deleteDir()
- */
- public function deleteDir($dirname) {
- $this->scenario->action('deleteDir', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::copyDir()
- */
- public function copyDir($src, $dst) {
- $this->scenario->action('copyDir', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::seeInThisFile()
- */
- public function seeInThisFile($text) {
- $this->scenario->assertion('seeInThisFile', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::dontSeeInThisFile()
- */
- public function dontSeeInThisFile($text) {
- $this->scenario->action('dontSeeInThisFile', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::deleteThisFile()
- */
- public function deleteThisFile() {
- $this->scenario->action('deleteThisFile', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-
-
- /**
- * This method is generated. DO NOT EDIT.
- *
- * @see \Codeception\Module\Filesystem::seeFileFound()
- */
- public function seeFileFound($filename, $path = null) {
- $this->scenario->assertion('seeFileFound', func_get_args());
- if ($this->scenario->running()) {
- $result = $this->scenario->runStep();
- return new Maybe($result);
- }
- return new Maybe();
- }
-}
-
View
4 tests/data/sandbox/tests/dummy/FileExistsCept.php
@@ -1,4 +0,0 @@
-<?php
-$I = new DumbGuy($scenario);
-$I->wantTo('check config exists');
-$I->seeFileFound('codeception.yml');
View
3  tests/data/sandbox/tests/dummy/_bootstrap.php
@@ -1,3 +0,0 @@
-<?php
-// Here you can initialize variables that will for your tests
-require_once \Codeception\Configuration::dataDir().'DummyClass.php';
Please sign in to comment.
Something went wrong with that request. Please try again.