Closed Valicek1 closed 7 years ago
This is weird. I tried to follow your steps as much as possible, but it work for me fine. Does your BasePresenter extend Nette\Application\UI\Presenter
? Because in pure sandbox there is $response
(vendor/nette/application/src/Application/UI/Presenter.php:53).
I cannot understand what is going on and cannot reproduce it... :-(
Yes, HomepagePresenter
is extending BasePresenter
, BasePresenter
extends Nette\Application\UI\Presenter
dump($this instanceof BasePresenter); # TRUE
dump($this instanceof \Nette\Application\UI\Presenter); # TRUE
I also tried
dump($this->response); # Cannot read an undeclared property App\Presenters\HomepagePresenter::$response
And - I have tried it with PHP 7 (Arch linux distro), PHP 7.1 (custom compiled) and PHP 5.6.23 (Arch - custom compiled + Debian distro) - always the same problem, with bare sandbox
You have to access $response
like this. I'll give it one more (more deeply) try. Stay tuned...
Cannot reproduce.
I just came across this error. I was able to fix it by replacing get_parent_class($service)
for '\Nette\Application\UI\Presenter'
.
vendor/bin/run-tests --scaffold tests/bootstrap.php does not work propertly, even on plain nette sandbox. Im not able to explain it very well, but i'll show you how to reproduce.
1, Create sandbox vasek@W520 ~ $
mkdir /tmp/testbench
0 ✓ vasek@W520 ~ $cd /tmp/testbench/
0 ✓ vasek@W520 /tmp/testbench $composer create-project nette/sandbox .
2, Install nette/tester from dev-master 0 ✓ vasek@W520 /tmp/testbench $
composer require --dev nette/tester:dev-master
3, Install testbench 0 ✓ vasek@W520 /tmp/testbench $
composer require --dev mrtnzlml/testbench
4, configure DB etc.. 0 ✓ vasek@W520 /tmp/testbench $
vim app/config/config.local.neon
0 ✓ vasek@W520 /tmp/testbench $cat app/config/config.local.neon
0 ✓ vasek@W520 /tmp/testbench $
vim tests/bootstrap.php
0 ✓ vasek@W520 /tmp/testbench $cat tests/bootstrap.php
0 ✓ vasek@W520 /tmp/testbench $ rm tests/ bootstrap.php ExampleTest.phpt
0 ✓ vasek@W520 /tmp/testbench $
rm tests/ExampleTest.phpt
0 ✓ vasek@W520 /tmp/testbench $cat > import.sql <<"EOF"
EOF
5, Run 0 ✓ vasek@W520 /tmp/testbench $vendor/bin/run-tests --scaffold tests/bootstrap.php
255 ✗ vasek@W520 /tmp/testbench $