Comments (7)
How do you run it? I tried the most simple case and nothing happend. Tester takes methods by reflection.
use Tester\Assert;
require __DIR__ . '/bootstrap.php'; # from Tester libs
class Test extends Tester\TestCase {
/*
public function testSomething() // it will try to run this
{
///
}
*/
}
$t = new Test;
$t->run();
EDIT: I guess you run it manually by $t->run('testSomething')
.
from tester.
TestHandler runs it and this is the reason: https://github.com/nette/tester/blob/master/Tester/Runner/TestHandler.php#L145
from tester.
This (and #62) should be solved in initiateTestCase():
- by running testcase with special argument that returns list of methods
- by parsing file via tokenizer
I think 1) is better solution.
from tester.
Choice 1) seems better, but because of TestCases with constructor, new static method would be better. On the other side, there is a need to find a descendant of TestCase class name. It can be done by regexp, but tokenizer is better. And when the tokenizer is used, it can be used for all.
from tester.
@dg What about 3) option: Set TESTER_LIST_TEST_METHODS
environment var, and TestCase::run()
prints serialized methods and die.
from tester.
Evironment variable is actually a great idea :)
from tester.
In addition, by expecting an output of TestCase::run()
in pre-run phase can be checked that method has been called at all :)
from tester.
Related Issues (20)
- Teamcity native support HOT 6
- FileMock test fails in PHP 7.3.0beta3 HOT 1
- Missing response code assertion HOT 2
- Class 'SimpleXMLElement' not found
- bypassFinals: touch() expects parameter 2 to be integer, null given
- bypassFinals: breaks file locking HOT 1
- E_USER_WARNING: File's modification time is in the future. Cannot update it: touch(): Tester\FileMock::stream_metadata is not implemented! HOT 4
- Support for minor distinction of exceptions HOT 3
- Annotation like @accessPrivateMethod HOT 3
- Add warning about wrong regex form in Assert::match() in tester output HOT 1
- PHP 7.4 support HOT 4
- Runner: Waiting for last async Job causes high CPU usage HOT 1
- Wrong usage of ANSI terminal colors HOT 2
- dataProvider & Tester\DataProvider::testQuery() must be of the type string
- fwrite to php://stderr throws E_NOTICE on php 7.4 HOT 21
- Export coverage to Cobertura xml format HOT 1
- `\Tester\TestCase::tearDown` is not executed on php crash HOT 3
- Tracking deprecations HOT 6
- Assert::type should accept native type names "boolean" and "double" HOT 1
- Cove coverage HTML report has all PHP sources compacted to only one line HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tester.