Skip to content

Instantly share code, notes, and snippets.

@zulus
Created October 20, 2014 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zulus/cdcaad17a9c3645007a0 to your computer and use it in GitHub Desktop.
Save zulus/cdcaad17a9c3645007a0 to your computer and use it in GitHub Desktop.
Import tests for bug 435922
<?php
namespace A {
/**
* My magic test class
*
* @return \DateTime
*/
function getdate() {
return 'what_ever';
}
\getdate(); // ctrl + click on getdate, should go to date.php stubs. Hover is also invalid. This looks like a problem with selection engine
}
namespace B {
getdate()-> // shouldn't work as \DateTime. \getdate() fallback
;; // fix CA ;)
}
namespace C {
use function getdate as getdate_alias;
getdate_alias()-> // not work
;; // fix CA ;)
}
namespace D {
getd // I see \getdate() A::getdate() (should be A\getdate())
;; // fix CA ;)
}
namespace E {
getda // select A::getdate and enter:
// Code generated (4 tabs before getdate() always, PSR-2 formatter)
// use function A\getdate;
// getdate()
// should be:
// use function A\getdate;
// getdate()
;; // fix CA ;)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment