Unit testing with PHPUnit: Testing a collection class (7/10)

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024

ความคิดเห็น • 19

  • @Chaosweaver667
    @Chaosweaver667 5 ปีที่แล้ว +6

    This is very interesting. I like the idea of creating the test, then implementing the "mock" method to make sure it works, so that when you refactor with actual code, you know it still passes the tests.
    I'm definitely going to implement this into a project I'm working on now, because currently for "testing" all I'm doing is logging out different inputs to make sure it works, however this automated version is so much nicer because if anything changes I can simply run all the tests rather than manually logging everything again.

  • @santiagomedinafiguera7280
    @santiagomedinafiguera7280 4 ปีที่แล้ว +2

    assertInternalType() is deprecated and removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead.

  • @spicytuna08
    @spicytuna08 5 ปีที่แล้ว +4

    superb TDD course.

  • @ahanafi-id
    @ahanafi-id 2 ปีที่แล้ว

    Great Tutorial! I enjoyed following this course! Thank you so much..

  • @urospurtic9904
    @urospurtic9904 5 ปีที่แล้ว +1

    Amazing explanation, thank you! This series help me a lot!

  • @JuanVqz
    @JuanVqz 7 ปีที่แล้ว +1

    Thanks for your time! So cool

  • @NeverCodeAlone
    @NeverCodeAlone 3 ปีที่แล้ว

    Thx for this nice tutorial and your passion

  • @maz4962
    @maz4962 7 ปีที่แล้ว +1

    Amazing explanation, thank you!

  • @vlache6983
    @vlache6983 4 ปีที่แล้ว +1

    why not using "this->get()" in returned jsonSerialize() method ?
    also not using magic methods like __sleep() in serialisation !

    • @callmegabin
      @callmegabin 3 ปีที่แล้ว +1

      Interested to know the answer too!

  • @mehdielfatihi9459
    @mehdielfatihi9459 4 ปีที่แล้ว

    thanks man

  • @lakpasherpa8177
    @lakpasherpa8177 7 ปีที่แล้ว +1

    Great Tutorial. I am beginner and getting every point clearly.
    Can you please provide Source Code??
    Thanks in advance!!

    • @sethtaylor7519
      @sethtaylor7519 6 ปีที่แล้ว +5

      If you are clearly getting every point, why would you need the source?

    • @matmccann
      @matmccann 4 ปีที่แล้ว

      @@sethtaylor7519 If you do not have source code, then you are learning by dictation. One of the MOST IMPORTANT parts to learning is testing your interpretation of what is dictated to you by acting. This action is changing the code for yourself. This largely separates GREAT lessons from GOOD lessons. You have made a Huge oversight on your side Seth.

    • @Cursos7Br1
      @Cursos7Br1 2 ปีที่แล้ว

      @@matmccann You should copy the code yourself, not get the source. This way you learn much more.

  • @spicytuna08
    @spicytuna08 5 ปีที่แล้ว

    what a weird of way of doing a project. it seems to be the main deliverable is test, not the actual project. thanks

    • @allenallada6754
      @allenallada6754 5 ปีที่แล้ว +3

      it's to make sure that the result of your methods is always the same even you do refactoring of your codes.