Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit c65fe7b

Browse files
committed
Install phpspec
1 parent ca52e5d commit c65fe7b

5 files changed

Lines changed: 34 additions & 23 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.contrib
2+
bin
23
vendor
34
cover
45
*.phar

Makefile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,27 @@ lint:
22
find src -name *.php -exec php -l {} \;
33
find tests -name *.php -exec php -l {} \;
44
find examples -name *.php -exec php -l {} \;
5-
5+
66
cs: lint
7-
./vendor/bin/phpcbf --standard=PSR2 src tests examples
8-
./vendor/bin/phpcs --standard=PSR2 --warning-severity=0 src tests examples
9-
./vendor/bin/phpcs --standard=Squiz --sniffs=Squiz.Commenting.FunctionComment,Squiz.Commenting.FunctionCommentThrowTag,Squiz.Commenting.ClassComment,Squiz.Commenting.VariableComment src tests examples
7+
./bin/phpcbf --standard=PSR2 src tests examples
8+
./bin/phpcs --standard=PSR2 --warning-severity=0 src tests examples
9+
./bin/phpcs --standard=Squiz --sniffs=Squiz.Commenting.FunctionComment,Squiz.Commenting.FunctionCommentThrowTag,Squiz.Commenting.ClassComment,Squiz.Commenting.VariableComment src tests examples
1010

1111
test:
12-
./vendor/bin/phpunit
12+
./bin/phpunit test
1313

14-
cover:
15-
./vendor/bin/phpunit --coverage-html ./cover
14+
bdd:
15+
./bin/phpspec run
1616

17+
cover:
18+
./bin/phpunit --coverage-html ./cover test
1719
deps:
1820
wget -q https://getcomposer.org/composer.phar -O ./composer.phar
1921
chmod +x composer.phar
2022
php composer.phar install
2123

2224
dist-clean:
25+
rm -rf bin
2326
rm -rf vendor
2427
rm -f composer.phar
2528
rm -f composer.lock

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
"require-dev": {
1111
"phpunit/phpunit": "4.7.*",
1212
"satooshi/php-coveralls": "dev-master",
13-
"squizlabs/php_codesniffer": "~2.0"
13+
"squizlabs/php_codesniffer": "~2.0",
14+
"phpspec/phpspec": "~2.0"
15+
},
16+
"config": {
17+
"bin-dir": "bin"
1418
},
1519
"authors": [
1620
{
@@ -38,13 +42,9 @@
3842
}
3943
],
4044
"autoload": {
41-
"psr-4": {
42-
"Nats\\": "src"
43-
}
44-
},
45-
"autoload-dev": {
46-
"psr-4": {
47-
"Tests\\Nats\\": "tests/Unit"
45+
"psr-0": {
46+
"Nats": "src",
47+
"Nats\\Test": "src"
4848
}
4949
}
5050
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace spec\Nats;
4+
5+
use PhpSpec\ObjectBehavior;
6+
use Prophecy\Argument;
7+
8+
class ConnectionOptionsSpec extends ObjectBehavior
9+
{
10+
function it_is_initializable()
11+
{
12+
$this->shouldHaveType('Nats\ConnectionOptions');
13+
}
14+
}

test/ConnectionOptionsTest.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<?php
2-
/**
3-
* Created by PhpStorm.
4-
* User: isselguberna
5-
* Date: 29/9/15
6-
* Time: 23:48
7-
*/
8-
9-
namespace Nats\tests\Unit;
2+
namespace Nats\Test;
103

114
use Nats\ConnectionOptions;
125

0 commit comments

Comments
 (0)