Skip to content

Conversation

@ondrejmirtes
Copy link
Contributor

No description provided.

@ondrejmirtes ondrejmirtes force-pushed the islinkcurrent-tests-php7 branch 3 times, most recently from e85c82e to 18357c1 Compare March 28, 2016 15:42
@ondrejmirtes ondrejmirtes force-pushed the islinkcurrent-tests-php7 branch 2 times, most recently from fabb404 to 3e7e7a0 Compare March 28, 2016 18:52
@ondrejmirtes ondrejmirtes force-pushed the islinkcurrent-tests-php7 branch from 3e7e7a0 to b1f7565 Compare March 28, 2016 18:54
@ondrejmirtes
Copy link
Contributor Author

@dg This is a first draft aimed at resolving #124. I added a bunch more tests that should have been part of PR #125, but I didn't foresee the need for them.

I wasn't sure what data structure should I use to pass data from parseLinkDestination, value object with getters might be better but I'm not sure about performance impact so I sticked to a plain array.

@ondrejmirtes ondrejmirtes force-pushed the islinkcurrent-tests-php7 branch from b1f7565 to df2f934 Compare March 28, 2016 19:11
$current = $parsedLinkDestination['current'];
$component = $parsedLinkDestination['callee'];
$signal = $parsedLinkDestination['signal'];
$fragment = $parsedLinkDestination['fragment'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use extract

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's exactly what I didn't want to do.

Ondřej Mirtes

On Tue, Mar 29, 2016 at 2:35 AM -0700, "Jan Tvrdík" [email protected] wrote:

In src/Application/UI/Presenter.php:

  •     }
    
  •     try {
    
  •         $presenterClass = $this->presenterFactory->getPresenterClass($presenter);
    
  •     } catch (Application\InvalidPresenterException $e) {
    
  •         throw new InvalidLinkException($e->getMessage(), NULL, $e);
    
  •     }
    
  • $parsedLinkDestination = $this->parseLinkDestination($component, $destination);
    
  • $destination = $parsedLinkDestination['destination'];
    
  • $scheme = $parsedLinkDestination['scheme'];
    
  • $presenter = $parsedLinkDestination['presenter'];
    
  • $presenterClass = $parsedLinkDestination['presenterClass'];
    
  • $action = $parsedLinkDestination['action'];
    
  • $current = $parsedLinkDestination['current'];
    
  • $component = $parsedLinkDestination['callee'];
    
  • $signal = $parsedLinkDestination['signal'];
    
  • $fragment = $parsedLinkDestination['fragment'];
    

You can use extract


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$parsedLinkDestination['current'] is always FALSE

@dg
Copy link
Member

dg commented Apr 1, 2016

There is something wrong, now test passes even if you delete all methods from TestControl…

@dg
Copy link
Member

dg commented Apr 1, 2016

tests: Moved TestControl to separate file to be reusable across tests I think it is not good idea, it brings dependency between different tests. I'll skip this commit and merge other tests to master, ok?

@dg dg closed this in 10a5eb9 Apr 2, 2016
@dg
Copy link
Member

dg commented Apr 2, 2016

@ondrejmirtes I closed it this way 6d12b3c, and thanks for all the tests!

@ondrejmirtes
Copy link
Contributor Author

Cool 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants