IRC logs

20150919

Logs from channel #fedext on freenode - our official support channel.

IRC log range: 20150919*

20150919

  • 06:05:21 <mneuhaus> NamelessCoder: found a way to test/compare static/non-static rendering in the unit tests ;)
  • 06:05:35 <mneuhaus> working through everything step by step now
  • 06:08:57 <NamelessCoder> there's no static mocking so no, not really
  • 06:09:33 <mneuhaus> http://dl.dropbox.com/u/314491/Screenshots/anv543qj73ca.png
  • 06:10:07 <mneuhaus> i first tried mocking the templacecompile, etc somehow
  • 06:10:10 <NamelessCoder> compilableinterface will go away soon and every VH will say TRUE to that one, so I'm not sure that's the way
  • 06:10:28 <NamelessCoder> we can only mock the rendering context and closure here :/
  • 06:10:34 <NamelessCoder> and ofc arguments
  • 06:10:51 <mneuhaus> well, at least it's a test that works for now? ^^
  • 06:11:42 <mneuhaus> kinda weird there's 2 ways to execute the "same" stuff anyway
  • 06:12:12 <mneuhaus> i think the templateView should only render the static way, if present
  • 06:12:25 <NamelessCoder> render() would simply call renderStatic when VH is compilable so testing render() should test both
  • 06:12:56 <mneuhaus> should yes, but currently isn't which provides a need to ensure they behave the same
  • 06:15:02 <NamelessCoder> in that case I would make a second test method that tests only the static execution. It's good to test for, but making assertions at this point is not expected
  • 06:15:51 <mneuhaus> ok
  • 06:17:48 <mneuhaus> prob is, i first have to find out which viewHelpers all fail, and then add the specific additonal test to each and every one
  • 06:18:00 <mneuhaus> this way i'd be catching them all in one swoop
  • 06:18:07 <mneuhaus> + cathing any new ones for now
  • 06:19:18 <NamelessCoder> for detection sure, it's fine ;) but once standalone fluid is merged this will execute for every VH and involve a lot of very possibly unmocked deps (due to static; rendercontext, empty closure etc)
  • 06:19:31 <mneuhaus> ok :)
  • 06:23:15 <mneuhaus> http://dl.dropbox.com/u/314491/Screenshots/5v38gqlh0s_v.png
  • 06:23:17 <mneuhaus> ? :)
  • 06:25:27 <NamelessCoder> yep that would be the way after you've identified which ones need a static test ;)
  • 06:25:39 <mneuhaus> i'm adding those to every one i encounter ;)
  • 06:25:47 <mneuhaus> and remove the general one in the end
  • 06:26:17 <mneuhaus> although, maybe i'll commit it in commented out, for future compile-bug-hunts?
  • 06:26:47 <NamelessCoder> no commented-out code, that'd cause CGL errors ;)
  • 06:26:59 <mneuhaus> if(false) ;D
  • 06:27:04 <mneuhaus> joking ;)
  • 06:27:30 <mneuhaus> if (CONTEXT == 'BUGHUNTING')
  • 06:29:25 <NamelessCoder> hehehe :)
  • 06:30:06 <mneuhaus> phew, this commit will be extensive ^^
  • 06:31:23 <mneuhaus> i could split them up a bit i guess
  • 06:31:34 <mneuhaus> will be a big batch to review
  • 06:33:18 <NamelessCoder> if it's BIG, split up into scopes of viewhelpers
  • 06:33:37 <mneuhaus> it'll involve at least 90% of all condition viewhelpers
  • 06:33:44 <mneuhaus> plus their tests
  • 06:34:54 <mneuhaus> will split em according to namespaces :)
  • 06:36:45 <NamelessCoder> yeah so that's a lot of viewhelpers
  • 06:37:14 <mneuhaus> yep, all currently failing as soon as they are executed cached
  • 06:58:50 <mneuhaus> i'm a bit baffled how this can currently not fail
  • 06:58:51 <mneuhaus> https://github.com/FluidTYPO3/vhs/blob/development/Tests/Unit/ViewHelpers/Condition/Context/IsFrontendViewHelperTest.php#L29-L52
  • 06:59:03 <mneuhaus> 1. $instance isn't used *at all*
  • 06:59:21 <mneuhaus> 2. verdict is only used in the $instance -> so not used as well
  • 06:59:49 <mneuhaus> so, how can the render result in 2 different results for the same $arguments
  • 07:00:02 <mneuhaus> doh, completely stupid, forget it
  • 07:19:15 <mneuhaus> NamelessCoder: would be cool if you could take a peek at the first batch:
  • 07:19:16 <mneuhaus> https://github.com/FluidTYPO3/vhs/pull/906
  • 07:19:47 <mneuhaus> it contains the ConditionViewHelperTrait we talked about which i'll need to base the other batches on :)
  • 07:30:26 <NamelessCoder> are we forced to duplicate those rendering methods on the Trait?
  • 07:46:09 <mneuhaus> yep, those are in the new AbstractConditionViewHelper, but not the old one
  • 07:46:10 <mneuhaus> :)
  • 07:46:11 <mneuhaus> :(