Skip to content

Commit

Permalink
Initial source import
Browse files Browse the repository at this point in the history
  • Loading branch information
jubianchi committed May 15, 2015
0 parents commit bc566c2
Show file tree
Hide file tree
Showing 32 changed files with 1,750 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# atoum stubs

![atoum](http://downloads.atoum.org/images/logo.png)

## Install it

Install extension using [composer](https://getcomposer.org):

```json
{
"require-dev": {
"atoum/stubs": "*"
}
}
```

## Use it

Once your IDE is correctly configured, the only thing you will have to do is use atoum
through one of its alias:

```php
<?php

// tests/units/random.php

namespace tests\units;

use atoum; // or mageekguy\atoum

class random extends atoum {
// ...
}
```

atoum provides 3 aliases for the main test class, choose the one you prefer:

* `atoum`
* `atoum\test`
* `mageekguy\atoum`


Once done, you will get full featured code-completion:

![atoum-stubs](demo.gif)
3 changes: 3 additions & 0 deletions classes/atoum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

class atoum extends atoum\test {}
10 changes: 10 additions & 0 deletions classes/atoum/test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace atoum;

use mageekguy;

class test extends mageekguy\atoum
{

}
220 changes: 220 additions & 0 deletions classes/mageekguy/atoum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
<?php

namespace mageekguy;

use
mageekguy,
mageekguy\atoum\stubs,
mageekguy\atoum\stubs\asserters,
mageekguy\atoum\test,
mageekguy\atoum\php,
mageekguy\atoum\mock
;

/**
* @method $this and(...$mixed)
* @method $this as($alias)
* @method $this if(...$mixed)
* @method $this use($target)
*/
class atoum extends mageekguy\atoum\test
{
use stubs\asserters

/**
* @var static
*/
public $and;

/**
* @var static
*/
public $assert;

/**
* @var test\assertion\aliaser
*/
public $define;

/**
* @var \exception
*/
public $exception;

/**
* @var php\mocker
*/
public $function;

/**
* @var static
*/
public $given;

/**
* @var static
*/
public $if;

/**
* @var object
*/
public $newInstance;

/**
* @var object
*/
public $newTestedInstance;

/**
* @var asserters\testedClass
*/
public $testedClass;

/**
* @var object
*/
public $testedInstance;

/**
* @var static
*/
public $then;

/**
* @param mock\aggregator $mock
*
* @return mock\controller
*/
public function ƒ(mock\aggregator $mock) {}

/**
* @param string $case
*
* @return $this
*/
public function assert($case = null) {}

/**
* @param mock\aggregator $mock
*
* @return mock\controller
*/
public function calling(mock\aggregator $mock) {}

/**
* @param mixed ...$mixed
*
* @return $this
*/
public function define(...$mixed) {}

/**
* @param ...$mixed
*
* @return $this
*/
public function dump(...$mixed) {}

/**
* @param mixed $mixed
*
* @return $this
*/
public function dumpOnFailure($mixed) {}

/**
* @param \closure $callback
*
* @return $this
*/
public function executeOnFailure(\closure $callback) {}

/**
* @param string $class
*
* @return $this
*/
public function from($class) {}

/**
* @param mixed ...$mixed
*
* @return $this
*/
public function given(...$mixed) {}

/**
* @param mixed ...$mixed
*
* @return $this
*/
public function let(...$mixed) {}

/**
* @param string $class
* @param string $mockNamespace
* @param string $mockClass
*
* @return $this
*/
public function mockClass($class, $mockNamespace = null, $mockClass = null) {}

/**
* @param mixed ...$mixed
*
* @return mock\generator
*/
public function mockGenerator() {}

/**
* @param string $mockNamespace
* @param string $mockClass
*
* @return $this
*/
public function mockTestedClass($mockNamespace = null, $mockClass = null) {}

/**
* @param mixed ...$arguments
*
* @return object
*/
public function newTestedInstance(...$arguments) {}

/**
* @param mixed ...$arguments
*
* @return object
*/
public function newInstance(...$arguments) {}

/**
* @throws test\exceptions\stop
*
* @return $this
*/
public function stop() {}

/**
* @param mixed ...$mixed
*
* @return $this
*/
public function then(...$mixed) {}

/**
* @param \closure|mixed $mixed
*
* @return $this
*/
public function when($mixed) {}


/**
* @param test\adapter $adapter
*
* @return asserters\adapter
*/
public function adapter(test\adapter $adapter) {}
}
Loading

0 comments on commit bc566c2

Please sign in to comment.