[Vortex] Proper typing of $this->class in unit tests

Review Request #1050 — Created Oct. 31, 2023 and submitted

pprkut
Lunr.Vortex
3f36008...
lunr

Proper typing of $this->class in unit tests

GitHub actions run: https://github.com/pprkut/lunr.vortex/actions/runs/6706992834

  • 0
  • 0
  • 0
  • 2
  • 2
Description From Last Updated
b.stoop
  1. 
      
  2. src/Lunr/Vortex/APNS/ApnsPHP/Tests/APNSDispatcherTest.php (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     

    It seems a bit redundant to set $this->class twice, here and again in parent::baseSetUp

    1. I know, but that's how PHP's typing works. The parent class is private and of type object. The local class is a separate variable from the parent private one, and has type APNSDispatcher&MockObject.
      The parent must be private, otherwise there can't be two separate types. You can also see some more discussion in the Halo review: https://reviews.lunr.nl/r/1044/

  3. $this->class is also unset in the parent::tearDown

  4. 
      
b.stoop
  1. Ship It!
  2. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (ddf435f)
Loading...