Skip to content

Commit

Permalink
Merge branch '2.3' of github.com:Codeception/Codeception into 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Aug 10, 2017
2 parents 5d0af26 + dcc26ac commit 851aa33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Codeception/Lib/Connector/Symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ public function rebootKernel()
$this->kernel->boot();
$this->container = $this->kernel->getContainer();

if ($this->container->has('profiler')) {
$this->container->get('profiler')->enable();
}

foreach ($this->persistentServices as $serviceName => $service) {
$this->container->set($serviceName, $service);
}

if ($this->container->has('profiler')) {
$this->container->get('profiler')->enable();
}
}
}
2 changes: 1 addition & 1 deletion src/Codeception/Module/MongoDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public function haveInCollection($collection, array $data)
return $data['_id'];
} else {
$response = $collection->insertOne($data);
return $response->getInsertedId()->__toString();
return (string) $response->getInsertedId();
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/Codeception/Step.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,10 @@ protected function addMetaStep($step, $stack)
continue;
}

$this->metaStep = new Step\Meta($step['function'], array_values($step['args']));
// in case arguments were passed by reference, copy args array to ensure dereference. array_values() does not dereference values
$this->metaStep = new Step\Meta($step['function'], array_map(function ($i) {
return $i;
}, array_values($step['args'])));
$this->metaStep->setTraceInfo($step['file'], $step['line']);

// pageobjects or other classes should not be included with "I"
Expand Down

0 comments on commit 851aa33

Please sign in to comment.