Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Robert Basic:
Complex argument matching in Mockery
May 09, 2017 @ 15:40:15

Robert Basic has written up a new tutorial for the unit testers out there showing how to do some complex argument matching in Mockery, a popular testing tool that offers an alternative to PHPUnit's own mocking functionality.

This past weekend I did some issue maintenance and bug triage on Mockery. One thing I noticed going through all these issues, is that people were surprised when learning about the Mockery::on() argument matcher. I know Mockery’s documentation isn’t the best documentation out there, but this still is a documented feature.

He starts with a simple mock example, mocking out AClass and defining two method criteria (one with a once and another with a never). He points out that things are not always that simple and sometime more complex argument matching is required. The Mockery:on handler allows you to pass in a closure and do more complex evaluation of the values passed in. He includes an example of this, evaluating the result of a set of arguments passed in and ensuring they're all set.

tagged: complex mocking mockery argument tutorial on method closure tutorial

Link: https://robertbasic.com/blog/complex-argument-matching-in-mockery/

Job Posting:
ShesConnected.com Seeks Senior PHP Developer (Toronto, ON)
Mar 02, 2009 @ 23:01:36

Company ShesConnected.com
Location Toronto, ON
Title Sr. PHP Developer
Summary

We looking for a Senior PHP Developer As a member of our development team you would work on our web platform, building and extending our flagship social networking site.

You are:

  • Smart
  • A creative thinker
  • You treat programming like an art
  • You are deeply inspired by the problems you have to solve as a developer
  • You are passionate about your work

    Your Responsibilities:

    • Building a scalable API to existing web technologies
    • Building modules for extendibility and reuse where possible
    • Building and extending clean web interfaces

    Education and Experience Required

    • Experience developing medium to large scale web-based applications
    • Experience in Object Oriented Development, Linux, Apache, PHP5, MySQL5, Perl, Javascript and web based UI design/implementation using (X)HTML/CSS
    • The ability to write clean, well structured, commented and maintainable code
    • Experience with database design via SQL
    • ~Asset: A revision control system such as Subversion, capable of writing scalable code. Experience working with and building web frameworks.

    Other Skills

    • Ability to communicate with technical and non-technical people alike
    • Ability to deliver what you promise on time
    • Strong analytical skills
    • Initiative to advance projects
    • A keen interest in learning
    • Enthusiastic team player with a sense of humor

    How to Apply to be Considered:
    For immediate consideration, please submit your resume and a cover letter highlighting relevant experience and expected salary to donna.marie@shesconnected.com

  • tagged: job toronto on shesconnected senior developer

    Link:

    Job Posting:
    Ganz Interactive Seeks PHP Developer (Toronto, ON)
    Jul 18, 2008 @ 18:44:42

    Company Ganz Interactive
    Location Toronto, ON
    Title PHP Developer
    Summary

    We have an exciting permanent opportunity for a PHP Developer to join our highly successful and growing Interactive Group. Our high end flash games and animated characters have made Webkinz.com the fastest growing children’s entertainment site on the internet. Be part of our dynamic Ganz Interactive Group and contribute to exciting future projects.

    Responsibilities:

    • Optimize SQL queries and understand object oriented programming.
    • Manipulate data and log files to provide extensive statistical reporting.
    • Create and maintain PHP scripts.
    • Ensure high level of server and network security.
    • Create and maintain detailed documentation of server and database environment.
    • Work on applications with high volume of users.

    Qualifications:

    • A minimum of 3 years PHP or combined PHP and JAVA development. experience, involving both front end and back end programming.
    • Experience working with Unix/Linux Servers and writing secure applications.
    • Experience with MySQL or other DBMS‘ is a plus.
    • Familiarities with XML, Flash and good documentation skills are a plus.
    • Excellent communication skills.
    • Computer Science/Engineering degree preferred.
    • Experience with additional programming languages preferred.

    Interested candidates are invited to forward resumes by email to careers [at] this domain.

    Please check out our website www.webkinz.com.

    tagged: ganzinteractive job post developer toronto on

    Link:

    Cliff Wells' Blog:
    Why the light has gone out on LAMP
    Jun 06, 2006 @ 14:22:41

    No matter what the state of a language/application/etc is, how much it's supported by the masses, there will always be those out there balancing out the popularity with their own opinions to the contrary. Where some see one of the best things since slides bread, others see things weighted towards the less positive side. For the popular LAMP package, one of those people is Cliff Wells who voices his opinions in this new blog post.

    Open source software has fought a long battle to get where it is today, and at least 3/4 of the so-called LAMP (Linux, Apache, MySQL, PHP) stack are under vigorous attack by many, myself included. Why? I can't speak for everyone, or for that matter, anyone but myself, but I'm good at doing that so here goes.

    He makes several points about the package, including:

    There's a quick comment at the end noting that PHP and MySQL have done a lot to "bring open source into the mainstream", but that they've done their job and we need to move on.

    tagged: lamp mysql apache linux problems opinions move on lamp mysql apache linux problems opinions move on

    Link:

    Cliff Wells' Blog:
    Why the light has gone out on LAMP
    Jun 06, 2006 @ 14:22:41

    No matter what the state of a language/application/etc is, how much it's supported by the masses, there will always be those out there balancing out the popularity with their own opinions to the contrary. Where some see one of the best things since slides bread, others see things weighted towards the less positive side. For the popular LAMP package, one of those people is Cliff Wells who voices his opinions in this new blog post.

    Open source software has fought a long battle to get where it is today, and at least 3/4 of the so-called LAMP (Linux, Apache, MySQL, PHP) stack are under vigorous attack by many, myself included. Why? I can't speak for everyone, or for that matter, anyone but myself, but I'm good at doing that so here goes.

    He makes several points about the package, including:

    There's a quick comment at the end noting that PHP and MySQL have done a lot to "bring open source into the mainstream", but that they've done their job and we need to move on.

    tagged: lamp mysql apache linux problems opinions move on lamp mysql apache linux problems opinions move on

    Link:

    Chris Shiflett's Blog:
    SERVER_NAME Versus HTTP_HOST
    Mar 17, 2006 @ 12:53:14

    On Chris Shiflett's blog, there's a post that looks a an issue that's been brought up on the New York PHP mailing list concerning two variables in the $_SERVER superglobal - SERVER_NAME and HTTP_POST.

    The question initially was "arean't these the same thing?" Chris answers:

    There were several informative replies within the first few minutes, but there's more to this question than most people realize. In fact, I'm reminded of a blog entry from Zeev last year, where he warns against $_SERVER['SERVER_NAME'].

    Zeev suggests that SERVER_NAME is pulled from the Host header from the remote user. Chris reminds us, also, of some disagreements with this view Zeev presented, namely from Rasmus. Chris then gives an example script to illustrate hos things area really handled - the variables use the given values when they're present in the request, but they still do default back to the ServerName when absent (so only in certain circumstances).

    tagged: server_name http_post superglobal depends on sent header server_name http_post superglobal depends on sent header

    Link:

    Chris Shiflett's Blog:
    SERVER_NAME Versus HTTP_HOST
    Mar 17, 2006 @ 12:53:14

    On Chris Shiflett's blog, there's a post that looks a an issue that's been brought up on the New York PHP mailing list concerning two variables in the $_SERVER superglobal - SERVER_NAME and HTTP_POST.

    The question initially was "arean't these the same thing?" Chris answers:

    There were several informative replies within the first few minutes, but there's more to this question than most people realize. In fact, I'm reminded of a blog entry from Zeev last year, where he warns against $_SERVER['SERVER_NAME'].

    Zeev suggests that SERVER_NAME is pulled from the Host header from the remote user. Chris reminds us, also, of some disagreements with this view Zeev presented, namely from Rasmus. Chris then gives an example script to illustrate hos things area really handled - the variables use the given values when they're present in the request, but they still do default back to the ServerName when absent (so only in certain circumstances).

    tagged: server_name http_post superglobal depends on sent header server_name http_post superglobal depends on sent header

    Link:

    Jim Plush's Blog:
    Another PHP Framework that falls flat - PHP on Trax
    Feb 07, 2006 @ 21:10:12

    Jim Plush, in his latest blog entry, looks at one of the PHP frameworks offered out on the web, PHP on Trax, and why it falls flat.

    A rails alternative in PHP? Sounds great, I dont have to spend my weekend learning Ruby. That's what I hoped when I came across PHP on Trax which dubs itself as a Rails alternative for PHP. At first glimpse of the code they do a nice job implementing a dynamic active record setup to quickly generate the most commonly needed funtionality.

    Where this framework really falls flat is documentation, samples, and support.

    He doesn't give any samples of how the framework is used (code), but he does describe the frustration he felt working on an application without the proper documentation and even quotes David Heinemeir on the same subject.

    You want a framework to cut your development time, not have you digging through source code to try and find errors and documentation. PHP Trax has potential, yet falls flat for lack of documenation, support, and/or general community interest.

    tagged: on trax framework ruby on rails bad documentation falls flat on trax framework ruby on rails bad documentation falls flat

    Link:

    Jim Plush's Blog:
    Another PHP Framework that falls flat - PHP on Trax
    Feb 07, 2006 @ 21:10:12

    Jim Plush, in his latest blog entry, looks at one of the PHP frameworks offered out on the web, PHP on Trax, and why it falls flat.

    A rails alternative in PHP? Sounds great, I dont have to spend my weekend learning Ruby. That's what I hoped when I came across PHP on Trax which dubs itself as a Rails alternative for PHP. At first glimpse of the code they do a nice job implementing a dynamic active record setup to quickly generate the most commonly needed funtionality.

    Where this framework really falls flat is documentation, samples, and support.

    He doesn't give any samples of how the framework is used (code), but he does describe the frustration he felt working on an application without the proper documentation and even quotes David Heinemeir on the same subject.

    You want a framework to cut your development time, not have you digging through source code to try and find errors and documentation. PHP Trax has potential, yet falls flat for lack of documenation, support, and/or general community interest.

    tagged: on trax framework ruby on rails bad documentation falls flat on trax framework ruby on rails bad documentation falls flat

    Link:

    Jim Plush's Blog:
    Another PHP Framework that falls flat - PHP on Trax
    Feb 07, 2006 @ 21:10:12

    Jim Plush, in his latest blog entry, looks at one of the PHP frameworks offered out on the web, PHP on Trax, and why it falls flat.

    A rails alternative in PHP? Sounds great, I dont have to spend my weekend learning Ruby. That's what I hoped when I came across PHP on Trax which dubs itself as a Rails alternative for PHP. At first glimpse of the code they do a nice job implementing a dynamic active record setup to quickly generate the most commonly needed funtionality.

    Where this framework really falls flat is documentation, samples, and support.

    He doesn't give any samples of how the framework is used (code), but he does describe the frustration he felt working on an application without the proper documentation and even quotes David Heinemeir on the same subject.

    You want a framework to cut your development time, not have you digging through source code to try and find errors and documentation. PHP Trax has potential, yet falls flat for lack of documenation, support, and/or general community interest.

    tagged: on trax framework ruby on rails bad documentation falls flat on trax framework ruby on rails bad documentation falls flat

    Link:


    Trending Topics: