Skip to content

Commit d4f3a9b

Browse files
committed
add tests
1 parent d15e150 commit d4f3a9b

File tree

4 files changed

+47
-8
lines changed

4 files changed

+47
-8
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ composer.phar
22
/vendor/
33
index.php
44
.env
5+
composer_dev.json
6+
/tests/trash.php
57

68
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
79
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file

composer.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"require-dev": {
1111
"vlucas/phpdotenv": "^2.4@dev",
12-
"phpunit/phpunit": "~5.7"
12+
"phpunit/phpunit": "^6.0"
1313
},
1414
"license": "MIT",
1515
"authors": [
@@ -23,12 +23,15 @@
2323
"Yespbs\\FlysystemEgnyte\\": "src/"
2424
}
2525
},
26-
"repositories": [
27-
{
28-
"type": "git",
29-
"url": "https://github.com/yespbs/egnyte.git"
26+
"autoload-dev": {
27+
"psr-4": {
28+
"Yespbs\\FlysystemEgnyte\\Test\\": "tests"
3029
}
31-
],
32-
"minimum-stability": "dev",
33-
"prefer-stable": true
30+
},
31+
"scripts": {
32+
"test": "vendor/bin/phpunit"
33+
},
34+
"config": {
35+
"sort-packages": true
36+
}
3437
}

src/EgnyteAdapter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ class EgnyteAdapter extends AbstractAdapter
1616
{
1717
use NotSupportingVisibilityTrait;
1818

19+
/**
20+
* @var
21+
*/
1922
protected $client;
2023

2124
/**

tests/EgnyteAdapterTest.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
namespace Yespbs\FlysystemEgnyte\Test;
3+
4+
use Prophecy\Argument;
5+
use Yespbs\Egnyte\Model\File as EgnyteClient;
6+
use League\Flysystem\Config;
7+
use GuzzleHttp\Psr7\Response;
8+
use PHPUnit\Framework\TestCase;
9+
use Yespbs\FlysystemEgnyte\EgnyteAdapter;
10+
11+
class EgnyteAdapterTest extends TestCase
12+
{
13+
/**
14+
* @var
15+
*/
16+
protected $client;
17+
18+
/**
19+
* @var
20+
*/
21+
protected $egnyteAdapter;
22+
23+
/**
24+
* @todo
25+
*/
26+
public function setUp()
27+
{
28+
$this->client = $this->prophesize(EgnyteClient::class);
29+
$this->egnyteAdapter = new EgnyteAdapter($this->client->reveal(), 'prefix');
30+
}
31+
}

0 commit comments

Comments
 (0)