Hywan / atoum-instrumentation

The atoum\instrumentation library. Instrumentation for PHP (moles, code coverage…)
7 stars 2 forks source link

Dynamic property access #9

Open jubianchi opened 10 years ago

jubianchi commented 10 years ago
$data = $this->{$this->dataProviders[$testMethod]}();

becomes

$data = $this->{$this->dataProviders[$testMethod]}\mageekguy\atoum\instrumentation\coverage::markJoin('mageekguy\atoum\test::runTestMethod', 12);();

From mageekguy\atoum\test#L1043

jubianchi commented 10 years ago

When the instrumentation encouters a property accessed using $this->{$foo} it stops. Nothing is instrumented after the line containing the dynamic access.

Hywan commented 10 years ago

Yup, it's normal. The } changes the state of the sequence matcher (from “in function” to “in class”).